using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
using System.Text;
using System.Xml;

namespace SBPweb.Themes.Windows.Skins
{
	/// <summary>
	/// Enum of layout directions
	/// </summary>
	public enum LayoutDirection
	{
		/// <summary>
		/// Vertical style
		/// </summary>
		Vertical,
		/// <summary>
		/// Horizontal style
		/// </summary>
		Horizontal
	}

	/// <summary>
	/// Class of SkinCacher
	/// </summary>
	public class SkinCacher
	{
		private Skin skin;

		#region Cache fields

		private Size mComboMinSize;

		private Color mFormBackColor;
		private Color mFormForeColor;
		private Color mControlColor;
		private Color mControlDisabledColor;
		private Color mControlTextColor;
		private Color mControlDisabledTextColor;
		private Color mBarForeColor;
		private Color mPopupMenuBackColor;
		private Color mPopupMenuForeColor;
		//private Color mLabelBackColor;
		private Color mComboBackColor;


		private Margin mToolStripLinkSelectedMargin;
		private Margin mToolStripPopupMenuCheckMargin;
		private Margin mToolStripPopupMenuLinkSelectedMargin;
		private Margin mToolStripPopupMenuSideStripMargin;
		private Margin mMainMenuMargin;
		private Margin mBarHorizontalMargin;
		private Margin mBarVerticalMargin;
		private Margin mButtonSizingMargin;
		private Margin mButtonContentMargin;
		private Margin mTabHeaderSizingMargin;
		private Margin mTabPaneSizingMargin;
		private Margin mTabHeaderContentMargin;
		private Margin mTabPaneContentMargin;
		private Margin mScrollButtonSizingMargin;
		private Margin mScrollShaftHorizSizingMargin;
		private Margin mScrollShaftVertSizingMargin;
		private Margin mScrollThumbHorizSizingMargin;
		private Margin mScrollThumbVertSizingMargin;
		private Margin mComboSizingMargin;
		private Margin mComboContentMargin;
		private Margin mComboBorderThin;

		private Image mMainMenuImage;
		private Image mBarHorizontalImage;
		private Image mBarVerticalImage;
		private Image mTabHeaderImage;
		private Image mTabPaneImage;
		private Image mButtonImage;
		private Image mBarSeparatorImage;
		private Image mBarVerticalSeparatorImage;
		private Image mComboButtonImage;
		private Image mComboButtonGlyphImage;
		private Image mGroupPanelImage;

		private Border mComboPopupFormBorder;
		

		private LayoutDirection mTabHeaderLayout;
		private LayoutDirection mTabPaneLayout;
		private LayoutDirection mButtonLayout;
		private LayoutDirection mComboGlyphLayout;
		private LayoutDirection mComboButtonLayout;

		private Rectangle mMainMenuImageLeftTop;
		private Rectangle mMainMenuImageLeftMiddle;
		private Rectangle mMainMenuImageLeftBottom;
		private Rectangle mMainMenuImageMiddleTop;
		private Rectangle mMainMenuImageMiddle;
		private Rectangle mMainMenuImageMiddleBottom;
		private Rectangle mMainMenuImageRightTop;
		private Rectangle mMainMenuImageRightMiddle;
		private Rectangle mMainMenuImageRightBottom;

		private Rectangle mBarHorizontalImageLeftTop;
		private Rectangle mBarHorizontalImageLeftMiddle;
		private Rectangle mBarHorizontalImageLeftBottom;
		private Rectangle mBarHorizontalImageMiddleTop;
		private Rectangle mBarHorizontalImageMiddle;
		private Rectangle mBarHorizontalImageMiddleBottom;
		private Rectangle mBarHorizontalImageRightTop;
		private Rectangle mBarHorizontalImageRightMiddle;
		private Rectangle mBarHorizontalImageRightBottom;

		private Rectangle mBarVerticalImageLeftTop;
		private Rectangle mBarVerticalImageLeftMiddle;
		private Rectangle mBarVerticalImageLeftBottom;
		private Rectangle mBarVerticalImageMiddleTop;
		private Rectangle mBarVerticalImageMiddle;
		private Rectangle mBarVerticalImageMiddleBottom;
		private Rectangle mBarVerticalImageRightTop;
		private Rectangle mBarVerticalImageRightMiddle;
		private Rectangle mBarVerticalImageRightBottom;

		private Image mTrackbarTrack;
		private Image mTrackbarThumb;
		private Image mTrackbarThumbBoth;

		#region Form's parts

		// FormButtonClose
		private Image mFormButtonCloseImage;
		private LayoutDirection mFormButtonCloseVerticalLayout;
		private Margin mFormButtonCloseSizingMargin;
		private int mFormButtonCloseCount;
		private int mFormButtonCloseWidth;
		private int mFormButtonCloseHeight;
		private Image[] mFormButtonCloseImageLT;
		private Image[] mFormButtonCloseImageT;
		private Image[] mFormButtonCloseImageRT;
		private Image[] mFormButtonCloseImageLM;
		private Image[] mFormButtonCloseImageM;
		private Image[] mFormButtonCloseImageRM;
		private Image[] mFormButtonCloseImageLB;
		private Image[] mFormButtonCloseImageB;
		private Image[] mFormButtonCloseImageRB;

		// FormButtonClose's glyph
		private Image mFormButtonCloseGlyphImage;
		private LayoutDirection mFormButtonCloseGlyphVerticalLayout;
		private int mFormButtonCloseGlyphCount;
		private int mFormButtonCloseGlyphWidth;
		private int mFormButtonCloseGlyphHeight;
		private Image[] mFormButtonCloseGlyphImageM;

		// FormButtonHelp
		private Image mFormButtonHelpImage;
		private LayoutDirection mFormButtonHelpVerticalLayout;
		private Margin mFormButtonHelpSizingMargin;
		private int mFormButtonHelpCount;
		private int mFormButtonHelpWidth;
		private int mFormButtonHelpHeight;
		private Image[] mFormButtonHelpImageLT;
		private Image[] mFormButtonHelpImageT;
		private Image[] mFormButtonHelpImageRT;
		private Image[] mFormButtonHelpImageLM;
		private Image[] mFormButtonHelpImageM;
		private Image[] mFormButtonHelpImageRM;
		private Image[] mFormButtonHelpImageLB;
		private Image[] mFormButtonHelpImageB;
		private Image[] mFormButtonHelpImageRB;

		// FormButtonHelp's glyph
		private Image mFormButtonHelpGlyphImage;
		private LayoutDirection mFormButtonHelpGlyphVerticalLayout;
		private int mFormButtonHelpGlyphCount;
		private int mFormButtonHelpGlyphWidth;
		private int mFormButtonHelpGlyphHeight;
		private Image[] mFormButtonHelpGlyphImageM;

		// FormButtonMaximize
		private Image mFormButtonMaximizeImage;
		private LayoutDirection mFormButtonMaximizeVerticalLayout;
		private Margin mFormButtonMaximizeSizingMargin;
		private int mFormButtonMaximizeCount;
		private int mFormButtonMaximizeWidth;
		private int mFormButtonMaximizeHeight;
		private Image[] mFormButtonMaximizeImageLT;
		private Image[] mFormButtonMaximizeImageT;
		private Image[] mFormButtonMaximizeImageRT;
		private Image[] mFormButtonMaximizeImageLM;
		private Image[] mFormButtonMaximizeImageM;
		private Image[] mFormButtonMaximizeImageRM;
		private Image[] mFormButtonMaximizeImageLB;
		private Image[] mFormButtonMaximizeImageB;
		private Image[] mFormButtonMaximizeImageRB;

		// FormButtonMaximize's glyph
		private Image mFormButtonMaximizeGlyphImage;
		private LayoutDirection mFormButtonMaximizeGlyphVerticalLayout;
		private int mFormButtonMaximizeGlyphCount;
		private int mFormButtonMaximizeGlyphWidth;
		private int mFormButtonMaximizeGlyphHeight;
		private Image[] mFormButtonMaximizeGlyphImageM;

		// FormButtonMinimize
		private Image mFormButtonMinimizeImage;
		private LayoutDirection mFormButtonMinimizeVerticalLayout;
		private Margin mFormButtonMinimizeSizingMargin;
		private int mFormButtonMinimizeCount;
		private int mFormButtonMinimizeWidth;
		private int mFormButtonMinimizeHeight;
		private Image[] mFormButtonMinimizeImageLT;
		private Image[] mFormButtonMinimizeImageT;
		private Image[] mFormButtonMinimizeImageRT;
		private Image[] mFormButtonMinimizeImageLM;
		private Image[] mFormButtonMinimizeImageM;
		private Image[] mFormButtonMinimizeImageRM;
		private Image[] mFormButtonMinimizeImageLB;
		private Image[] mFormButtonMinimizeImageB;
		private Image[] mFormButtonMinimizeImageRB;

		// FormButtonMinimize's glyph
		private Image mFormButtonMinimizeGlyphImage;
		private LayoutDirection mFormButtonMinimizeGlyphVerticalLayout;
		private int mFormButtonMinimizeGlyphCount;
		private int mFormButtonMinimizeGlyphWidth;
		private int mFormButtonMinimizeGlyphHeight;
		private Image[] mFormButtonMinimizeGlyphImageM;

		// FormButtonRestore
		private Image mFormButtonRestoreImage;
		private LayoutDirection mFormButtonRestoreVerticalLayout;
		private Margin mFormButtonRestoreSizingMargin;
		private int mFormButtonRestoreCount;
		private int mFormButtonRestoreWidth;
		private int mFormButtonRestoreHeight;
		private Image[] mFormButtonRestoreImageLT;
		private Image[] mFormButtonRestoreImageT;
		private Image[] mFormButtonRestoreImageRT;
		private Image[] mFormButtonRestoreImageLM;
		private Image[] mFormButtonRestoreImageM;
		private Image[] mFormButtonRestoreImageRM;
		private Image[] mFormButtonRestoreImageLB;
		private Image[] mFormButtonRestoreImageB;
		private Image[] mFormButtonRestoreImageRB;

		// FormButtonRestore's glyph
		private Image mFormButtonRestoreGlyphImage;
		private LayoutDirection mFormButtonRestoreGlyphVerticalLayout;
		private int mFormButtonRestoreGlyphCount;
		private int mFormButtonRestoreGlyphWidth;
		private int mFormButtonRestoreGlyphHeight;
		private Image[] mFormButtonRestoreGlyphImageM;

		// SmallFormButtonClose
		private Image mSmallFormButtonCloseImage;
		private LayoutDirection mSmallFormButtonCloseVerticalLayout;
		private Margin mSmallFormButtonCloseSizingMargin;
		private int mSmallFormButtonCloseCount;
		private int mSmallFormButtonCloseWidth;
		private int mSmallFormButtonCloseHeight;
		private Image[] mSmallFormButtonCloseImageLT;
		private Image[] mSmallFormButtonCloseImageT;
		private Image[] mSmallFormButtonCloseImageRT;
		private Image[] mSmallFormButtonCloseImageLM;
		private Image[] mSmallFormButtonCloseImageM;
		private Image[] mSmallFormButtonCloseImageRM;
		private Image[] mSmallFormButtonCloseImageLB;
		private Image[] mSmallFormButtonCloseImageB;
		private Image[] mSmallFormButtonCloseImageRB;

		// SmallFormButtonClose's glyph
		private Image mSmallFormButtonCloseGlyphImage;
		private LayoutDirection mSmallFormButtonCloseGlyphVerticalLayout;
		private int mSmallFormButtonCloseGlyphCount;
		private int mSmallFormButtonCloseGlyphWidth;
		private int mSmallFormButtonCloseGlyphHeight;
		private Image[] mSmallFormButtonCloseGlyphImageM;

		// ------------------------

		// FormCaption
		private Image mFormCaptionImage;
		private LayoutDirection mFormCaptionVerticalLayout;
		private Margin mFormCaptionSizingMargin;
		private Margin mFormCaptionContentMargin;
		private int mFormCaptionCount;
		private int mFormCaptionWidth;
		private int mFormCaptionHeight;
		private Image[] mFormCaptionImageLT;
		private Image[] mFormCaptionImageT;
		private Image[] mFormCaptionImageRT;
		private Image[] mFormCaptionImageLM;
		private Image[] mFormCaptionImageM;
		private Image[] mFormCaptionImageRM;
		private Image[] mFormCaptionImageLB;
		private Image[] mFormCaptionImageB;
		private Image[] mFormCaptionImageRB;

		// FormFrameBottom
		private Image mFormFrameBottomImage;
		private LayoutDirection mFormFrameBottomVerticalLayout;
		private Margin mFormFrameBottomSizingMargin;
		private int mFormFrameBottomCount;
		private int mFormFrameBottomWidth;
		private int mFormFrameBottomHeight;
		private Image[] mFormFrameBottomImageLT;
		private Image[] mFormFrameBottomImageT;
		private Image[] mFormFrameBottomImageRT;
		private Image[] mFormFrameBottomImageLM;
		private Image[] mFormFrameBottomImageM;
		private Image[] mFormFrameBottomImageRM;
		private Image[] mFormFrameBottomImageLB;
		private Image[] mFormFrameBottomImageB;
		private Image[] mFormFrameBottomImageRB;

		// FormFrameLeft
		private Image mFormFrameLeftImage;
		private LayoutDirection mFormFrameLeftVerticalLayout;
		private Margin mFormFrameLeftSizingMargin;
		private int mFormFrameLeftCount;
		private int mFormFrameLeftWidth;
		private int mFormFrameLeftHeight;
		private Image[] mFormFrameLeftImageLT;
		private Image[] mFormFrameLeftImageT;
		private Image[] mFormFrameLeftImageRT;
		private Image[] mFormFrameLeftImageLM;
		private Image[] mFormFrameLeftImageM;
		private Image[] mFormFrameLeftImageRM;
		private Image[] mFormFrameLeftImageLB;
		private Image[] mFormFrameLeftImageB;
		private Image[] mFormFrameLeftImageRB;

		// FormFrameRight
		private Image mFormFrameRightImage;
		private LayoutDirection mFormFrameRightVerticalLayout;
		private Margin mFormFrameRightSizingMargin;
		private int mFormFrameRightCount;
		private int mFormFrameRightWidth;
		private int mFormFrameRightHeight;
		private Image[] mFormFrameRightImageLT;
		private Image[] mFormFrameRightImageT;
		private Image[] mFormFrameRightImageRT;
		private Image[] mFormFrameRightImageLM;
		private Image[] mFormFrameRightImageM;
		private Image[] mFormFrameRightImageRM;
		private Image[] mFormFrameRightImageLB;
		private Image[] mFormFrameRightImageB;
		private Image[] mFormFrameRightImageRB;

		// SmallFormCaption
		private Image mSmallFormCaptionImage;
		private LayoutDirection mSmallFormCaptionVerticalLayout;
		private Margin mSmallFormCaptionSizingMargin;
		private Margin mSmallFormCaptionContentMargin;
		private int mSmallFormCaptionCount;
		private int mSmallFormCaptionWidth;
		private int mSmallFormCaptionHeight;
		private Image[] mSmallFormCaptionImageLT;
		private Image[] mSmallFormCaptionImageT;
		private Image[] mSmallFormCaptionImageRT;
		private Image[] mSmallFormCaptionImageLM;
		private Image[] mSmallFormCaptionImageM;
		private Image[] mSmallFormCaptionImageRM;
		private Image[] mSmallFormCaptionImageLB;
		private Image[] mSmallFormCaptionImageB;
		private Image[] mSmallFormCaptionImageRB;

		// SmallFormFrameBottom
		private Image mSmallFormFrameBottomImage;
		private LayoutDirection mSmallFormFrameBottomVerticalLayout;
		private Margin mSmallFormFrameBottomSizingMargin;
		private int mSmallFormFrameBottomCount;
		private int mSmallFormFrameBottomWidth;
		private int mSmallFormFrameBottomHeight;
		private Image[] mSmallFormFrameBottomImageLT;
		private Image[] mSmallFormFrameBottomImageT;
		private Image[] mSmallFormFrameBottomImageRT;
		private Image[] mSmallFormFrameBottomImageLM;
		private Image[] mSmallFormFrameBottomImageM;
		private Image[] mSmallFormFrameBottomImageRM;
		private Image[] mSmallFormFrameBottomImageLB;
		private Image[] mSmallFormFrameBottomImageB;
		private Image[] mSmallFormFrameBottomImageRB;

		// SmallFormFrameLeft
		private Image mSmallFormFrameLeftImage;
		private LayoutDirection mSmallFormFrameLeftVerticalLayout;
		private Margin mSmallFormFrameLeftSizingMargin;
		private int mSmallFormFrameLeftCount;
		private int mSmallFormFrameLeftWidth;
		private int mSmallFormFrameLeftHeight;
		private Image[] mSmallFormFrameLeftImageLT;
		private Image[] mSmallFormFrameLeftImageT;
		private Image[] mSmallFormFrameLeftImageRT;
		private Image[] mSmallFormFrameLeftImageLM;
		private Image[] mSmallFormFrameLeftImageM;
		private Image[] mSmallFormFrameLeftImageRM;
		private Image[] mSmallFormFrameLeftImageLB;
		private Image[] mSmallFormFrameLeftImageB;
		private Image[] mSmallFormFrameLeftImageRB;

		// SmallFormFrameRight
		private Image mSmallFormFrameRightImage;
		private LayoutDirection mSmallFormFrameRightVerticalLayout;
		private Margin mSmallFormFrameRightSizingMargin;
		private int mSmallFormFrameRightCount;
		private int mSmallFormFrameRightWidth;
		private int mSmallFormFrameRightHeight;
		private Image[] mSmallFormFrameRightImageLT;
		private Image[] mSmallFormFrameRightImageT;
		private Image[] mSmallFormFrameRightImageRT;
		private Image[] mSmallFormFrameRightImageLM;
		private Image[] mSmallFormFrameRightImageM;
		private Image[] mSmallFormFrameRightImageRM;
		private Image[] mSmallFormFrameRightImageLB;
		private Image[] mSmallFormFrameRightImageB;
		private Image[] mSmallFormFrameRightImageRB;

		#endregion

		#endregion

		/// <summary>
		/// Constructor of SkinCacher
		/// </summary>
		/// <param name="skin"></param>
		public SkinCacher(Skin skin)
		{
			this.skin = skin;

			//inicialise cache
			InitialiseBaseProperties(skin);
		}

		#region Public properties

		/// <summary>
		/// Minimum size of combo
		/// </summary>
		public Size ComboMinSize
		{
			get { return mComboMinSize; }
		}

		#region Colors

		/// <summary>
		/// Backcolor of form
		/// </summary>
		public Color FormBackColor
		{
			get	{ return mFormBackColor; }
		}

		/// <summary>
		/// Forecolor of form
		/// </summary>
		public Color FormForeColor
		{
			get	{ return mFormForeColor; }
		}

		/// <summary>
		/// Color of control
		/// </summary>
		public Color ControlColor
		{
			get { return mControlColor; }
		}

		/// <summary>
		/// Disabled color of control
		/// </summary>
		public Color ControlDisabledColor
		{
			get { return mControlDisabledColor; }
		}

		/// <summary>
		/// Text color of control
		/// </summary>
		public Color ControlTextColor
		{
			get { return mControlTextColor; }
		}

		/// <summary>
		/// Disabled text color of control
		/// </summary>
		public Color ControlDisabledTextColor
		{
			get { return mControlDisabledTextColor; }
		}

		/// <summary>
		/// Forecolor of bar
		/// </summary>
		public Color BarForeColor
		{
			get { return mBarForeColor; }
		}

		/// <summary>
		/// Backcolor of popup menu
		/// </summary>
		public Color PopupMenuBackColor
		{
			get { return mPopupMenuBackColor; }
		}

		/// <summary>
		/// Forecolor of popup menu
		/// </summary>
		public Color PopupMenuForeColor
		{
			get { return mPopupMenuForeColor; }
		}

		/// <summary>
		/// Backcolor of Combo
		/// </summary>
		public Color ComboBackColor
		{
			get { return mComboBackColor; }
		}

		#endregion

		/// <summary>
		/// Formborder of combo popup
		/// </summary>
		public Border ComboPopupFormBorder
		{
			get { return mComboPopupFormBorder; }
		}

		#region Margins

		/// <summary>
		/// Selected toolstriplink's margin
		/// </summary>
		public Margin ToolStripLinkSelectedMargin
		{
			get { return mToolStripLinkSelectedMargin; }
		}

		/// <summary>
		/// Margin of thin combo border
		/// </summary>
		public Margin ComboBorderThin
		{
			get { return mComboBorderThin; }
		}

		/// <summary>
		/// Margin of Toolstrip popup menu check
		/// </summary>
		public Margin ToolStripPopupMenuCheckMargin
		{
			get { return mToolStripPopupMenuCheckMargin; }
		}

		/// <summary>
		/// Margin of Toolstrip popup menu selected link
		/// </summary>
		public Margin ToolStripPopupMenuLinkSelectedMargin
		{
			get { return mToolStripPopupMenuLinkSelectedMargin; }
		}

		/// <summary>
		/// Margin of Toolstrip popup menu side strip
		/// </summary>
		public Margin ToolStripPopupMenuSideStripMargin
		{
			get { return mToolStripPopupMenuSideStripMargin; }
		}

		/// <summary>
		/// Margin of main menu
		/// </summary>
		public Margin MainMenuMargin
		{
			get { return mMainMenuMargin; }
		}

		/// <summary>
		/// Margin of horizontal bar
		/// </summary>
		public Margin BarHorizontalMargin
		{
			get { return mBarHorizontalMargin; }
		}

		/// <summary>
		/// Margin of vertical bar
		/// </summary>
		public Margin BarVerticalMargin
		{
			get { return mBarVerticalMargin; }
		}

		/// <summary>
		/// Margin of button
		/// </summary>
		public Margin ButtonSizingMargin
		{
			get { return mButtonSizingMargin; }
		}

		/// <summary>
		/// Margin of button context
		/// </summary>
		public Margin ButtonContentMargin
		{
			get { return mButtonContentMargin; }
		}

		/// <summary>
		/// Margin of tab header
		/// </summary>
		public Margin TabHeaderSizingMargin
		{
			get { return mTabHeaderSizingMargin; }
		}

		/// <summary>
		/// Margin of tab pane
		/// </summary>
		public Margin TabPaneSizingMargin
		{
			get { return mTabPaneSizingMargin; }
		}

		/// <summary>
		/// Margin of tab header
		/// </summary>
		public Margin TabHeaderContentMargin
		{
			get { return mTabHeaderContentMargin; }
		}

		/// <summary>
		/// Margin of tab pane context
		/// </summary>
		public Margin TabPaneContentMargin
		{
			get { return mTabPaneContentMargin; }
		}

		/// <summary>
		/// Margin of scroll button
		/// </summary>
		public Margin ScrollButtonSizingMargin
		{
			get { return mScrollButtonSizingMargin; }
		}

		/// <summary>
		/// Margin of horizontal scroll shaft
		/// </summary>
		public Margin ScrollShaftHorizSizingMargin
		{
			get { return mScrollShaftHorizSizingMargin; }
		}

		/// <summary>
		/// Margin of vertical scroll shaft
		/// </summary>
		public Margin ScrollShaftVertSizingMargin
		{
			get { return mScrollShaftVertSizingMargin; }
		}

		/// <summary>
		/// Margin of horizontal scroll thumb
		/// </summary>
		public Margin ScrollThumbHorizSizingMargin
		{
			get { return mScrollThumbHorizSizingMargin; }
		}

		/// <summary>
		/// Margin of vertical scroll thumb
		/// </summary>
		public Margin ScrollThumbVertSizingMargin
		{
			get { return mScrollThumbVertSizingMargin; }
		}

		/// <summary>
		/// Margin of combo
		/// </summary>
		public Margin ComboSizingMargin
		{
			get { return mComboSizingMargin;}
		}

		/// <summary>
		/// Margin of combo context
		/// </summary>
		public Margin ComboContentMargin
		{
			get { return mComboContentMargin; }
		}

		#endregion

		#region LayoutDirections

		/// <summary>
		/// Layout of tab header
		/// </summary>
		public LayoutDirection TabHeaderLayout
		{
			get { return mTabHeaderLayout; }
		}

		/// <summary>
		/// Layout of tab pane
		/// </summary>
		public LayoutDirection TabPaneLayout
		{
			get { return mTabPaneLayout; }
		}

		/// <summary>
		/// Layout of button
		/// </summary>
		public LayoutDirection ButtonLayout
		{
			get { return mButtonLayout; }
		}

		/// <summary>
		/// Layout of combo button
		/// </summary>
		public LayoutDirection ComboButtonLayout
		{
			get { return mComboButtonLayout; }
		}

		/// <summary>
		/// Layout of combo glyph
		/// </summary>
		public LayoutDirection ComboGlyphLayout
		{
			get { return mComboGlyphLayout; }
		}

		#endregion

		#region Images

		/// <summary>
		/// Image of main menu
		/// </summary>
		public Image MainMenuImage
		{
			get { return mMainMenuImage; }
		}

		/// <summary>
		/// Image of horizontal bar
		/// </summary>
		public Image BarHorizontalImage
		{
			get { return mBarHorizontalImage; }
		}

		/// <summary>
		/// Image of vertical bar
		/// </summary>
		public Image BarVerticalImage
		{
			get { return mBarVerticalImage; }
		}

		/// <summary>
		/// Image of tab header
		/// </summary>
		public Image TabHeaderImage
		{
			get { return mTabHeaderImage; }
		}

		/// <summary>
		/// Image of tab pane
		/// </summary>
		public Image TabPaneImage
		{
			get { return mTabPaneImage; }
		}

		/// <summary>
		/// Image of button
		/// </summary>
		public Image ButtonImage
		{
			get { return mButtonImage; }
		}

		/// <summary>
		/// Image of combo button
		/// </summary>
		public Image ComboButtonImage
		{
			get { return mComboButtonImage; }
		}

		/// <summary>
		/// Image of combo button glyph
		/// </summary>
		public Image ComboButtonGlyphImage
		{
			get { return mComboButtonGlyphImage; }
		}

		/// <summary>
		/// Image of bar separator
		/// </summary>
		public Image BarSeparatorImage
		{
			get { return mBarSeparatorImage; }
		}

		/// <summary>
		/// Image of vertical bar separator
		/// </summary>
		public Image BarVerticalSeparatorImage
		{
			get { return mBarVerticalSeparatorImage; }
		}

		/// <summary>
		/// Image of group panel
		/// </summary>
		public Image GroupPanelImage
		{
			get
			{
				return mGroupPanelImage;
			}
		}

		#endregion

		#region Rectangles

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageLeftTop
		{
			get 
			{
				return mMainMenuImageLeftTop; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageLeftMiddle
		{
			get 
			{
				return mMainMenuImageLeftMiddle; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageLeftBottom
		{
			get 
			{
				return mMainMenuImageLeftBottom; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageMiddleTop
		{
			get 
			{
				return mMainMenuImageMiddleTop; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageMiddle
		{
			get 
			{
				return mMainMenuImageMiddle; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageMiddleBottom
		{
			get 
			{
				return mMainMenuImageMiddleBottom; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageRightTop
		{
			get 
			{
				return mMainMenuImageRightTop; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageRightMiddle
		{
			get 
			{
				return mMainMenuImageRightMiddle; 
			}
		}

		/// <summary>
		/// Rectangle of main menu image
		/// </summary>
		public Rectangle MainMenuImageRightBottom
		{
			get 
			{
				return mMainMenuImageRightBottom; 
			}
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageLeftTop
		{
			get { return mBarHorizontalImageLeftTop; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageLeftMiddle
		{
			get 
			{
				return mBarHorizontalImageLeftMiddle; 
			}
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageLeftBottom
		{
			get 
			{
				return mBarHorizontalImageLeftBottom; 
			}
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageMiddleTop
		{
			get { return mBarHorizontalImageMiddleTop; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageMiddle
		{
			get { return mBarHorizontalImageMiddle; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageMiddleBottom
		{
			get { return mBarHorizontalImageMiddleBottom; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageRightTop
		{
			get { return mBarHorizontalImageRightTop; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageRightMiddle
		{
			get { return mBarHorizontalImageRightMiddle; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarHorizontalImageRightBottom
		{
			get { return mBarHorizontalImageRightBottom; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageLeftTop
		{
			get { return mBarVerticalImageLeftTop; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageLeftMiddle
		{
			get { return mBarVerticalImageLeftMiddle; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageLeftBottom
		{
			get { return mBarVerticalImageLeftBottom; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageMiddleTop
		{
			get { return mBarVerticalImageMiddleTop; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageMiddle
		{
			get { return mBarVerticalImageMiddle; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageMiddleBottom
		{
			get { return mBarVerticalImageMiddleBottom; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageRightTop
		{
			get { return mBarVerticalImageRightTop; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageRightMiddle
		{
			get { return mBarVerticalImageRightMiddle; }
		}

		/// <summary>
		/// Rectangle of bar image
		/// </summary>
		public Rectangle BarVerticalImageRightBottom
		{
			get { return mBarVerticalImageRightBottom; }
		}

		#endregion

		#region FormButtonClose

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image FormButtonCloseImage
		{
			get
			{
				return mFormButtonCloseImage;
			}
		}

		/// <summary>
		/// Laout of close form button
		/// </summary>
		public LayoutDirection FormButtonCloseVerticalLayout
		{
			get
			{
				return mFormButtonCloseVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of close form button
		/// </summary>
		public Margin FormButtonCloseSizingMargin
		{
			get
			{
				return mFormButtonCloseSizingMargin;
			}
		}

		/// <summary>
		/// Count of close form button
		/// </summary>
		public int FormButtonCloseCount
		{
			get
			{
				return mFormButtonCloseCount;
			}
		}

		/// <summary>
		/// Width of close form button
		/// </summary>
		public int FormButtonCloseWidth
		{
			get
			{
				return mFormButtonCloseWidth;
			}
		}

		/// <summary>
		/// Height of close form button
		/// </summary>
		public int FormButtonCloseHeight
		{
			get
			{
				return mFormButtonCloseHeight;
			}
		}

		/// <summary>
		/// Imagearray of close form button
		/// </summary>
		public Image[] FormButtonCloseImageLT
		{
			get
			{
				return mFormButtonCloseImageLT;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageT
		{
			get
			{
				return mFormButtonCloseImageT;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageRT
		{
			get
			{
				return mFormButtonCloseImageRT;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageLM
		{
			get
			{
				return mFormButtonCloseImageLM;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageM
		{
			get
			{
				return mFormButtonCloseImageM;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageRM
		{
			get
			{
				return mFormButtonCloseImageRM;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageLB
		{
			get
			{
				return mFormButtonCloseImageLB;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageB
		{
			get
			{
				return mFormButtonCloseImageB;
			}
		}

		/// <summary>
		/// Image of close form button
		/// </summary>
		public Image[] FormButtonCloseImageRB
		{
			get
			{
				return mFormButtonCloseImageRB;
			}
		}

		#endregion

		#region FormButtonCloseGlyph

		/// <summary>
		/// Image of close form button glyph
		/// </summary>
		public Image FormButtonCloseGlyphImage
		{
			get
			{
				return mFormButtonCloseGlyphImage;
			}
		}

		/// <summary>
		/// Layout of close form button glyph
		/// </summary>
		public LayoutDirection FormButtonCloseGlyphVerticalLayout
		{
			get
			{
				return mFormButtonCloseGlyphVerticalLayout;
			}
		}

		/// <summary>
		/// Count of close form button glyph
		/// </summary>
		public int FormButtonCloseGlyphCount
		{
			get
			{
				return mFormButtonCloseGlyphCount;
			}
		}

		/// <summary>
		/// Width of close form button glyph
		/// </summary>
		public int FormButtonCloseGlyphWidth
		{
			get
			{
				return mFormButtonCloseGlyphWidth;
			}
		}

		/// <summary>
		/// Height of close form button glyph
		/// </summary>
		public int FormButtonCloseGlyphHeight
		{
			get
			{
				return mFormButtonCloseGlyphHeight;
			}
		}

		/// <summary>
		/// Image of close form button glyph
		/// </summary>
		public Image[] FormButtonCloseGlyphImageM
		{
			get
			{
				return mFormButtonCloseGlyphImageM;
			}
		}

		#endregion

		#region FormButtonHelp

		/// <summary>
		/// Iamge of help form button
		/// </summary>
		public Image FormButtonHelpImage
		{
			get
			{
				return mFormButtonHelpImage;
			}
		}

		/// <summary>
		/// Layout of help form button
		/// </summary>
		public LayoutDirection FormButtonHelpVerticalLayout
		{
			get
			{
				return mFormButtonHelpVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of help form button
		/// </summary>
		public Margin FormButtonHelpSizingMargin
		{
			get
			{
				return mFormButtonHelpSizingMargin;
			}
		}

		/// <summary>
		/// Count of help form button
		/// </summary>
		public int FormButtonHelpCount
		{
			get
			{
				return mFormButtonHelpCount;
			}
		}

		/// <summary>
		/// Width of help form button
		/// </summary>
		public int FormButtonHelpWidth
		{
			get
			{
				return mFormButtonHelpWidth;
			}
		}

		/// <summary>
		/// Height of help form button
		/// </summary>
		public int FormButtonHelpHeight
		{
			get
			{
				return mFormButtonHelpHeight;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageLT
		{
			get
			{
				return mFormButtonHelpImageLT;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageT
		{
			get
			{
				return mFormButtonHelpImageT;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageRT
		{
			get
			{
				return mFormButtonHelpImageRT;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageLM
		{
			get
			{
				return mFormButtonHelpImageLM;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageM
		{
			get
			{
				return mFormButtonHelpImageM;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageRM
		{
			get
			{
				return mFormButtonHelpImageRM;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageLB
		{
			get
			{
				return mFormButtonHelpImageLB;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageB
		{
			get
			{
				return mFormButtonHelpImageB;
			}
		}

		/// <summary>
		/// Image of help form button
		/// </summary>
		public Image[] FormButtonHelpImageRB
		{
			get
			{
				return mFormButtonHelpImageRB;
			}
		}

		#endregion

		#region FormButtonHelpGlyph

		/// <summary>
		/// Image of help form button glyph
		/// </summary>
		public Image FormButtonHelpGlyphImage
		{
			get
			{
				return mFormButtonHelpGlyphImage;
			}
		}

		/// <summary>
		/// Layout of help form button glyph
		/// </summary>
		public LayoutDirection FormButtonHelpGlyphVerticalLayout
		{
			get
			{
				return mFormButtonHelpGlyphVerticalLayout;
			}
		}

		/// <summary>
		/// Count of help form button glyph
		/// </summary>
		public int FormButtonHelpGlyphCount
		{
			get
			{
				return mFormButtonHelpGlyphCount;
			}
		}

		/// <summary>
		/// Width of help form button glyph
		/// </summary>
		public int FormButtonHelpGlyphWidth
		{
			get
			{
				return mFormButtonHelpGlyphWidth;
			}
		}

		/// <summary>
		/// Height of help form button glyph
		/// </summary>
		public int FormButtonHelpGlyphHeight
		{
			get
			{
				return mFormButtonHelpGlyphHeight;
			}
		}

		/// <summary>
		/// Image of help form button glyph
		/// </summary>
		public Image[] FormButtonHelpGlyphImageM
		{
			get
			{
				return mFormButtonHelpGlyphImageM;
			}
		}

		#endregion

		#region FormButtonMaximize

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image FormButtonMaximizeImage
		{
			get
			{
				return mFormButtonMaximizeImage;
			}
		}

		/// <summary>
		/// Layout of maximize form button
		/// </summary>
		public LayoutDirection FormButtonMaximizeVerticalLayout
		{
			get
			{
				return mFormButtonMaximizeVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of maximize form button
		/// </summary>
		public Margin FormButtonMaximizeSizingMargin
		{
			get
			{
				return mFormButtonMaximizeSizingMargin;
			}
		}

		/// <summary>
		/// Count of maximize form button
		/// </summary>
		public int FormButtonMaximizeCount
		{
			get
			{
				return mFormButtonMaximizeCount;
			}
		}

		/// <summary>
		/// Width of maximize form button
		/// </summary>
		public int FormButtonMaximizeWidth
		{
			get
			{
				return mFormButtonMaximizeWidth;
			}
		}

		/// <summary>
		/// Height of maximize form button
		/// </summary>
		public int FormButtonMaximizeHeight
		{
			get
			{
				return mFormButtonMaximizeHeight;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageLT
		{
			get
			{
				return mFormButtonMaximizeImageLT;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageT
		{
			get
			{
				return mFormButtonMaximizeImageT;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageRT
		{
			get
			{
				return mFormButtonMaximizeImageRT;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageLM
		{
			get
			{
				return mFormButtonMaximizeImageLM;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageM
		{
			get
			{
				return mFormButtonMaximizeImageM;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageRM
		{
			get
			{
				return mFormButtonMaximizeImageRM;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageLB
		{
			get
			{
				return mFormButtonMaximizeImageLB;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageB
		{
			get
			{
				return mFormButtonMaximizeImageB;
			}
		}

		/// <summary>
		/// Image of maximize form button
		/// </summary>
		public Image[] FormButtonMaximizeImageRB
		{
			get
			{
				return mFormButtonMaximizeImageRB;
			}
		}

		#endregion

		#region FormButtonMaximizeGlyph

		/// <summary>
		/// Image of maximize form button glyph
		/// </summary>
		public Image FormButtonMaximizeGlyphImage
		{
			get
			{
				return mFormButtonMaximizeGlyphImage;
			}
		}

		/// <summary>
		/// Layout of maximize form button glyph
		/// </summary>
		public LayoutDirection FormButtonMaximizeGlyphVerticalLayout
		{
			get
			{
				return mFormButtonMaximizeGlyphVerticalLayout;
			}
		}

		/// <summary>
		/// Count of maximize form button glyph
		/// </summary>
		public int FormButtonMaximizeGlyphCount
		{
			get
			{
				return mFormButtonMaximizeGlyphCount;
			}
		}

		/// <summary>
		/// Width of maximize form button glyph
		/// </summary>
		public int FormButtonMaximizeGlyphWidth
		{
			get
			{
				return mFormButtonMaximizeGlyphWidth;
			}
		}

		/// <summary>
		/// Height of maximize form button glyph
		/// </summary>
		public int FormButtonMaximizeGlyphHeight
		{
			get
			{
				return mFormButtonMaximizeGlyphHeight;
			}
		}

		/// <summary>
		/// Image of maximize form button glyph
		/// </summary>
		public Image[] FormButtonMaximizeGlyphImageM
		{
			get
			{
				return mFormButtonMaximizeGlyphImageM;
			}
		}

		#endregion

		#region FormButtonMinimize

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image FormButtonMinimizeImage
		{
			get
			{
				return mFormButtonMinimizeImage;
			}
		}

		/// <summary>
		/// Layout of minimize form button
		/// </summary>
		public LayoutDirection FormButtonMinimizeVerticalLayout
		{
			get
			{
				return mFormButtonMinimizeVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of minimize form button
		/// </summary>
		public Margin FormButtonMinimizeSizingMargin
		{
			get
			{
				return mFormButtonMinimizeSizingMargin;
			}
		}

		/// <summary>
		/// Count of minimize form button
		/// </summary>
		public int FormButtonMinimizeCount
		{
			get
			{
				return mFormButtonMinimizeCount;
			}
		}

		/// <summary>
		/// Width of minimize form button
		/// </summary>
		public int FormButtonMinimizeWidth
		{
			get
			{
				return mFormButtonMinimizeWidth;
			}
		}

		/// <summary>
		/// Height of minimize form button
		/// </summary>
		public int FormButtonMinimizeHeight
		{
			get
			{
				return mFormButtonMinimizeHeight;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageLT
		{
			get
			{
				return mFormButtonMinimizeImageLT;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageT
		{
			get
			{
				return mFormButtonMinimizeImageT;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageRT
		{
			get
			{
				return mFormButtonMinimizeImageRT;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageLM
		{
			get
			{
				return mFormButtonMinimizeImageLM;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageM
		{
			get
			{
				return mFormButtonMinimizeImageM;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageRM
		{
			get
			{
				return mFormButtonMinimizeImageRM;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageLB
		{
			get
			{
				return mFormButtonMinimizeImageLB;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageB
		{
			get
			{
				return mFormButtonMinimizeImageB;
			}
		}

		/// <summary>
		/// Image of minimize form button
		/// </summary>
		public Image[] FormButtonMinimizeImageRB
		{
			get
			{
				return mFormButtonMinimizeImageRB;
			}
		}

		#endregion

		#region FormButtonMinimizeGlyph

		/// <summary>
		/// Image of minimize form button glyph
		/// </summary>
		public Image FormButtonMinimizeGlyphImage
		{
			get
			{
				return mFormButtonMinimizeGlyphImage;
			}
		}

		/// <summary>
		/// Layout of minimize form button glyph
		/// </summary>
		public LayoutDirection FormButtonMinimizeGlyphVerticalLayout
		{
			get
			{
				return mFormButtonMinimizeGlyphVerticalLayout;
			}
		}

		/// <summary>
		/// Count of minimize form button glyph
		/// </summary>
		public int FormButtonMinimizeGlyphCount
		{
			get
			{
				return mFormButtonMinimizeGlyphCount;
			}
		}

		/// <summary>
		/// Width of minimize form button glyph
		/// </summary>
		public int FormButtonMinimizeGlyphWidth
		{
			get
			{
				return mFormButtonMinimizeGlyphWidth;
			}
		}

		/// <summary>
		/// Height of minimize form button glyph
		/// </summary>
		public int FormButtonMinimizeGlyphHeight
		{
			get
			{
				return mFormButtonMinimizeGlyphHeight;
			}
		}

		/// <summary>
		/// Image of minimize form button glyph
		/// </summary>
		public Image[] FormButtonMinimizeGlyphImageM
		{
			get
			{
				return mFormButtonMinimizeGlyphImageM;
			}
		}

		#endregion

		#region FormButtonRestore

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image FormButtonRestoreImage
		{
			get
			{
				return mFormButtonRestoreImage;
			}
		}

		/// <summary>
		/// Layout of restore form button
		/// </summary>
		public LayoutDirection FormButtonRestoreVerticalLayout
		{
			get
			{
				return mFormButtonRestoreVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of restore form button
		/// </summary>
		public Margin FormButtonRestoreSizingMargin
		{
			get
			{
				return mFormButtonRestoreSizingMargin;
			}
		}

		/// <summary>
		/// Count of restore form button
		/// </summary>
		public int FormButtonRestoreCount
		{
			get
			{
				return mFormButtonRestoreCount;
			}
		}

		/// <summary>
		/// Width of restore form button
		/// </summary>
		public int FormButtonRestoreWidth
		{
			get
			{
				return mFormButtonRestoreWidth;
			}
		}

		/// <summary>
		/// Height of restore form button
		/// </summary>
		public int FormButtonRestoreHeight
		{
			get
			{
				return mFormButtonRestoreHeight;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageLT
		{
			get
			{
				return mFormButtonRestoreImageLT;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageT
		{
			get
			{
				return mFormButtonRestoreImageT;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageRT
		{
			get
			{
				return mFormButtonRestoreImageRT;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageLM
		{
			get
			{
				return mFormButtonRestoreImageLM;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageM
		{
			get
			{
				return mFormButtonRestoreImageM;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageRM
		{
			get
			{
				return mFormButtonRestoreImageRM;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageLB
		{
			get
			{
				return mFormButtonRestoreImageLB;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageB
		{
			get
			{
				return mFormButtonRestoreImageB;
			}
		}

		/// <summary>
		/// Image of restore form button
		/// </summary>
		public Image[] FormButtonRestoreImageRB
		{
			get
			{
				return mFormButtonRestoreImageRB;
			}
		}

		#endregion

		#region FormButtonRestoreGlyph

		/// <summary>
		/// Image of restore form button glyph
		/// </summary>
		public Image FormButtonRestoreGlyphImage
		{
			get
			{
				return mFormButtonRestoreGlyphImage;
			}
		}

		/// <summary>
		/// Layout of restore form button glyph
		/// </summary>
		public LayoutDirection FormButtonRestoreGlyphVerticalLayout
		{
			get
			{
				return mFormButtonRestoreGlyphVerticalLayout;
			}
		}

		/// <summary>
		/// Count of restore form button glyph
		/// </summary>
		public int FormButtonRestoreGlyphCount
		{
			get
			{
				return mFormButtonRestoreGlyphCount;
			}
		}

		/// <summary>
		/// Width of restore form button glyph
		/// </summary>
		public int FormButtonRestoreGlyphWidth
		{
			get
			{
				return mFormButtonRestoreGlyphWidth;
			}
		}

		/// <summary>
		/// Height of restore form button glyph
		/// </summary>
		public int FormButtonRestoreGlyphHeight
		{
			get
			{
				return mFormButtonRestoreGlyphHeight;
			}
		}

		/// <summary>
		/// Image of restore form button glyph
		/// </summary>
		public Image[] FormButtonRestoreGlyphImageM
		{
			get
			{
				return mFormButtonRestoreGlyphImageM;
			}
		}

		#endregion

		#region SmallFormButtonClose

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image SmallFormButtonCloseImage
		{
			get
			{
				return mSmallFormButtonCloseImage;
			}
		}

		/// <summary>
		/// Layout of small close form button
		/// </summary>
		public LayoutDirection SmallFormButtonCloseVerticalLayout
		{
			get
			{
				return mSmallFormButtonCloseVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of small close form button
		/// </summary>
		public Margin SmallFormButtonCloseSizingMargin
		{
			get
			{
				return mSmallFormButtonCloseSizingMargin;
			}
		}

		/// <summary>
		/// Count of small close form button
		/// </summary>
		public int SmallFormButtonCloseCount
		{
			get
			{
				return mSmallFormButtonCloseCount;
			}
		}

		/// <summary>
		/// Width of small close form button
		/// </summary>
		public int SmallFormButtonCloseWidth
		{
			get
			{
				return mSmallFormButtonCloseWidth;
			}
		}

		/// <summary>
		/// Height of small close form button
		/// </summary>
		public int SmallFormButtonCloseHeight
		{
			get
			{
				return mSmallFormButtonCloseHeight;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageLT
		{
			get
			{
				return mSmallFormButtonCloseImageLT;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageT
		{
			get
			{
				return mSmallFormButtonCloseImageT;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageRT
		{
			get
			{
				return mSmallFormButtonCloseImageRT;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageLM
		{
			get
			{
				return mSmallFormButtonCloseImageLM;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageM
		{
			get
			{
				return mSmallFormButtonCloseImageM;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageRM
		{
			get
			{
				return mSmallFormButtonCloseImageRM;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageLB
		{
			get
			{
				return mSmallFormButtonCloseImageLB;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageB
		{
			get
			{
				return mSmallFormButtonCloseImageB;
			}
		}

		/// <summary>
		/// Image of small close form button
		/// </summary>
		public Image[] SmallFormButtonCloseImageRB
		{
			get
			{
				return mSmallFormButtonCloseImageRB;
			}
		}

		#endregion

		#region SmallFormButtonCloseGlyph

		/// <summary>
		/// Image of small close form button glyph
		/// </summary>
		public Image SmallFormButtonCloseGlyphImage
		{
			get
			{
				return mSmallFormButtonCloseGlyphImage;
			}
		}

		/// <summary>
		/// Layout of small close form button glyph
		/// </summary>
		public LayoutDirection SmallFormButtonCloseGlyphVerticalLayout
		{
			get
			{
				return mSmallFormButtonCloseGlyphVerticalLayout;
			}
		}

		/// <summary>
		/// Count of small close form button glyph
		/// </summary>
		public int SmallFormButtonCloseGlyphCount
		{
			get
			{
				return mSmallFormButtonCloseGlyphCount;
			}
		}

		/// <summary>
		/// Width of small close form button glyph
		/// </summary>
		public int SmallFormButtonCloseGlyphWidth
		{
			get
			{
				return mSmallFormButtonCloseGlyphWidth;
			}
		}

		/// <summary>
		/// Height of small close form button glyph
		/// </summary>
		public int SmallFormButtonCloseGlyphHeight
		{
			get
			{
				return mSmallFormButtonCloseGlyphHeight;
			}
		}

		/// <summary>
		/// Image of small close form button glyph
		/// </summary>
		public Image[] SmallFormButtonCloseGlyphImageM
		{
			get
			{
				return mSmallFormButtonCloseGlyphImageM;
			}
		}

		#endregion

		#region FormCaption

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image FormCaptionImage
		{
			get
			{
				return mFormCaptionImage;
			}
		}

		/// <summary>
		/// Layout of form caption
		/// </summary>
		public LayoutDirection FormCaptionVerticalLayout
		{
			get
			{
				return mFormCaptionVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of form caption
		/// </summary>
		public Margin FormCaptionSizingMargin
		{
			get
			{
				return mFormCaptionSizingMargin;
			}
		}

		/// <summary>
		/// Margin of form caption
		/// </summary>
		public Margin FormCaptionContentMargin
		{
			get
			{
				return mFormCaptionContentMargin;
			}
		}

		/// <summary>
		/// Count of form caption
		/// </summary>
		public int FormCaptionCount
		{
			get
			{
				return mFormCaptionCount;
			}
		}

		/// <summary>
		/// Width of form caption
		/// </summary>
		public int FormCaptionWidth
		{
			get
			{
				return mFormCaptionWidth;
			}
		}

		/// <summary>
		/// Height of form caption
		/// </summary>
		public int FormCaptionHeight
		{
			get
			{
				return mFormCaptionHeight;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageLT
		{
			get
			{
				return mFormCaptionImageLT;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageT
		{
			get
			{
				return mFormCaptionImageT;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageRT
		{
			get
			{
				return mFormCaptionImageRT;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageLM
		{
			get
			{
				return mFormCaptionImageLM;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageM
		{
			get
			{
				return mFormCaptionImageM;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageRM
		{
			get
			{
				return mFormCaptionImageRM;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageLB
		{
			get
			{
				return mFormCaptionImageLB;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageB
		{
			get
			{
				return mFormCaptionImageB;
			}
		}

		/// <summary>
		/// Image of form caption
		/// </summary>
		public Image[] FormCaptionImageRB
		{
			get
			{
				return mFormCaptionImageRB;
			}
		}

		#endregion

		#region FormFrameBottom

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image FormFrameBottomImage
		{
			get
			{
				return mFormFrameBottomImage;
			}
		}

		/// <summary>
		/// Layout of bottom frame of form
		/// </summary>
		public LayoutDirection FormFrameBottomVerticalLayout
		{
			get
			{
				return mFormFrameBottomVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of bottom frame of form
		/// </summary>
		public Margin FormFrameBottomSizingMargin
		{
			get
			{
				return mFormFrameBottomSizingMargin;
			}
		}

		/// <summary>
		/// Count of bottom frame of form
		/// </summary>
		public int FormFrameBottomCount
		{
			get
			{
				return mFormFrameBottomCount;
			}
		}

		/// <summary>
		/// Width of bottom frame of form
		/// </summary>
		public int FormFrameBottomWidth
		{
			get
			{
				return mFormFrameBottomWidth;
			}
		}

		/// <summary>
		/// Height of bottom frame of form
		/// </summary>
		public int FormFrameBottomHeight
		{
			get
			{
				return mFormFrameBottomHeight;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageLT
		{
			get
			{
				return mFormFrameBottomImageLT;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageT
		{
			get
			{
				return mFormFrameBottomImageT;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageRT
		{
			get
			{
				return mFormFrameBottomImageRT;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageLM
		{
			get
			{
				return mFormFrameBottomImageLM;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageM
		{
			get
			{
				return mFormFrameBottomImageM;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageRM
		{
			get
			{
				return mFormFrameBottomImageRM;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageLB
		{
			get
			{
				return mFormFrameBottomImageLB;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageB
		{
			get
			{
				return mFormFrameBottomImageB;
			}
		}

		/// <summary>
		/// Image of bottom frame of form
		/// </summary>
		public Image[] FormFrameBottomImageRB
		{
			get
			{
				return mFormFrameBottomImageRB;
			}
		}

		#endregion

		#region FormFrameLeft

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image FormFrameLeftImage
		{
			get
			{
				return mFormFrameLeftImage;
			}
		}

		/// <summary>
		/// Layout of left frame of form
		/// </summary>
		public LayoutDirection FormFrameLeftVerticalLayout
		{
			get
			{
				return mFormFrameLeftVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of left frame of form
		/// </summary>
		public Margin FormFrameLeftSizingMargin
		{
			get
			{
				return mFormFrameLeftSizingMargin;
			}
		}

		/// <summary>
		/// Count of left frame of form
		/// </summary>
		public int FormFrameLeftCount
		{
			get
			{
				return mFormFrameLeftCount;
			}
		}

		/// <summary>
		/// Width of left frame of form
		/// </summary>
		public int FormFrameLeftWidth
		{
			get
			{
				return mFormFrameLeftWidth;
			}
		}

		/// <summary>
		/// Height of left frame of form
		/// </summary>
		public int FormFrameLeftHeight
		{
			get
			{
				return mFormFrameLeftHeight;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageLT
		{
			get
			{
				return mFormFrameLeftImageLT;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageT
		{
			get
			{
				return mFormFrameLeftImageT;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageRT
		{
			get
			{
				return mFormFrameLeftImageRT;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageLM
		{
			get
			{
				return mFormFrameLeftImageLM;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageM
		{
			get
			{
				return mFormFrameLeftImageM;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageRM
		{
			get
			{
				return mFormFrameLeftImageRM;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageLB
		{
			get
			{
				return mFormFrameLeftImageLB;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageB
		{
			get
			{
				return mFormFrameLeftImageB;
			}
		}

		/// <summary>
		/// Image of left frame of form
		/// </summary>
		public Image[] FormFrameLeftImageRB
		{
			get
			{
				return mFormFrameLeftImageRB;
			}
		}

		#endregion

		#region FormFrameRight

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image FormFrameRightImage
		{
			get
			{
				return mFormFrameRightImage;
			}
		}

		/// <summary>
		/// Lyout of right frame of form
		/// </summary>
		public LayoutDirection FormFrameRightVerticalLayout
		{
			get
			{
				return mFormFrameRightVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of right frame of form
		/// </summary>
		public Margin FormFrameRightSizingMargin
		{
			get
			{
				return mFormFrameRightSizingMargin;
			}
		}

		/// <summary>
		/// Count of right frame of form
		/// </summary>
		public int FormFrameRightCount
		{
			get
			{
				return mFormFrameRightCount;
			}
		}

		/// <summary>
		/// Width of right frame of form
		/// </summary>
		public int FormFrameRightWidth
		{
			get
			{
				return mFormFrameRightWidth;
			}
		}

		/// <summary>
		/// Height of right frame of form
		/// </summary>
		public int FormFrameRightHeight
		{
			get
			{
				return mFormFrameRightHeight;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageLT
		{
			get
			{
				return mFormFrameRightImageLT;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageT
		{
			get
			{
				return mFormFrameRightImageT;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageRT
		{
			get
			{
				return mFormFrameRightImageRT;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageLM
		{
			get
			{
				return mFormFrameRightImageLM;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageM
		{
			get
			{
				return mFormFrameRightImageM;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageRM
		{
			get
			{
				return mFormFrameRightImageRM;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageLB
		{
			get
			{
				return mFormFrameRightImageLB;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageB
		{
			get
			{
				return mFormFrameRightImageB;
			}
		}

		/// <summary>
		/// Image of right frame of form
		/// </summary>
		public Image[] FormFrameRightImageRB
		{
			get
			{
				return mFormFrameRightImageRB;
			}
		}

		#endregion

		#region SmallFormCaption

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image SmallFormCaptionImage
		{
			get
			{
				return mSmallFormCaptionImage;
			}
		}

		/// <summary>
		/// Layout of small form caption
		/// </summary>
		public LayoutDirection SmallFormCaptionVerticalLayout
		{
			get
			{
				return mSmallFormCaptionVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of small form caption
		/// </summary>
		public Margin SmallFormCaptionSizingMargin
		{
			get
			{
				return mSmallFormCaptionSizingMargin;
			}
		}

		/// <summary>
		/// Margin of small form caption context
		/// </summary>
		public Margin SmallFormCaptionContentMargin
		{
			get
			{
				return mSmallFormCaptionContentMargin;
			}
		}

		/// <summary>
		/// Count of small form caption
		/// </summary>
		public int SmallFormCaptionCount
		{
			get
			{
				return mSmallFormCaptionCount;
			}
		}

		/// <summary>
		/// Width of small form caption
		/// </summary>
		public int SmallFormCaptionWidth
		{
			get
			{
				return mSmallFormCaptionWidth;
			}
		}

		/// <summary>
		/// Height of small form caption
		/// </summary>
		public int SmallFormCaptionHeight
		{
			get
			{
				return mSmallFormCaptionHeight;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageLT
		{
			get
			{
				return mSmallFormCaptionImageLT;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageT
		{
			get
			{
				return mSmallFormCaptionImageT;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageRT
		{
			get
			{
				return mSmallFormCaptionImageRT;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageLM
		{
			get
			{
				return mSmallFormCaptionImageLM;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageM
		{
			get
			{
				return mSmallFormCaptionImageM;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageRM
		{
			get
			{
				return mSmallFormCaptionImageRM;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageLB
		{
			get
			{
				return mSmallFormCaptionImageLB;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageB
		{
			get
			{
				return mSmallFormCaptionImageB;
			}
		}

		/// <summary>
		/// Image of small form caption
		/// </summary>
		public Image[] SmallFormCaptionImageRB
		{
			get
			{
				return mSmallFormCaptionImageRB;
			}
		}

		#endregion

		#region SmallFormFrameBottom

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image SmallFormFrameBottomImage
		{
			get
			{
				return mSmallFormFrameBottomImage;
			}
		}

		/// <summary>
		/// Layout of small form bottom frame
		/// </summary>
		public LayoutDirection SmallFormFrameBottomVerticalLayout
		{
			get
			{
				return mSmallFormFrameBottomVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of small form bottom frame
		/// </summary>
		public Margin SmallFormFrameBottomSizingMargin
		{
			get
			{
				return mSmallFormFrameBottomSizingMargin;
			}
		}

		/// <summary>
		/// Count of small form bottom frame
		/// </summary>
		public int SmallFormFrameBottomCount
		{
			get
			{
				return mSmallFormFrameBottomCount;
			}
		}

		/// <summary>
		/// Width of small form bottom frame
		/// </summary>
		public int SmallFormFrameBottomWidth
		{
			get
			{
				return mSmallFormFrameBottomWidth;
			}
		}

		/// <summary>
		/// Height of small form bottom frame
		/// </summary>
		public int SmallFormFrameBottomHeight
		{
			get
			{
				return mSmallFormFrameBottomHeight;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageLT
		{
			get
			{
				return mSmallFormFrameBottomImageLT;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageT
		{
			get
			{
				return mSmallFormFrameBottomImageT;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageRT
		{
			get
			{
				return mSmallFormFrameBottomImageRT;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageLM
		{
			get
			{
				return mSmallFormFrameBottomImageLM;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageM
		{
			get
			{
				return mSmallFormFrameBottomImageM;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageRM
		{
			get
			{
				return mSmallFormFrameBottomImageRM;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageLB
		{
			get
			{
				return mSmallFormFrameBottomImageLB;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageB
		{
			get
			{
				return mSmallFormFrameBottomImageB;
			}
		}

		/// <summary>
		/// Image of small form bottom frame
		/// </summary>
		public Image[] SmallFormFrameBottomImageRB
		{
			get
			{
				return mSmallFormFrameBottomImageRB;
			}
		}

		#endregion

		#region SmallFormFrameLeft

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image SmallFormFrameLeftImage
		{
			get
			{
				return mSmallFormFrameLeftImage;
			}
		}

		/// <summary>
		/// Layout of small form left frame
		/// </summary>
		public LayoutDirection SmallFormFrameLeftVerticalLayout
		{
			get
			{
				return mSmallFormFrameLeftVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of small form left frame
		/// </summary>
		public Margin SmallFormFrameLeftSizingMargin
		{
			get
			{
				return mSmallFormFrameLeftSizingMargin;
			}
		}

		/// <summary>
		/// Count of small form left frame
		/// </summary>
		public int SmallFormFrameLeftCount
		{
			get
			{
				return mSmallFormFrameLeftCount;
			}
		}

		/// <summary>
		/// Width of small form left frame
		/// </summary>
		public int SmallFormFrameLeftWidth
		{
			get
			{
				return mSmallFormFrameLeftWidth;
			}
		}

		/// <summary>
		/// Height of small form left frame
		/// </summary>
		public int SmallFormFrameLeftHeight
		{
			get
			{
				return mSmallFormFrameLeftHeight;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageLT
		{
			get
			{
				return mSmallFormFrameLeftImageLT;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageT
		{
			get
			{
				return mSmallFormFrameLeftImageT;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageRT
		{
			get
			{
				return mSmallFormFrameLeftImageRT;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageLM
		{
			get
			{
				return mSmallFormFrameLeftImageLM;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageM
		{
			get
			{
				return mSmallFormFrameLeftImageM;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageRM
		{
			get
			{
				return mSmallFormFrameLeftImageRM;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageLB
		{
			get
			{
				return mSmallFormFrameLeftImageLB;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageB
		{
			get
			{
				return mSmallFormFrameLeftImageB;
			}
		}

		/// <summary>
		/// Image of small form left frame
		/// </summary>
		public Image[] SmallFormFrameLeftImageRB
		{
			get
			{
				return mSmallFormFrameLeftImageRB;
			}
		}

		#endregion

		#region SmallFormFrameRight

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image SmallFormFrameRightImage
		{
			get
			{
				return mSmallFormFrameRightImage;
			}
		}

		/// <summary>
		/// Layout of small form right frame
		/// </summary>
		public LayoutDirection SmallFormFrameRightVerticalLayout
		{
			get
			{
				return mSmallFormFrameRightVerticalLayout;
			}
		}

		/// <summary>
		/// Margin of small form right frame
		/// </summary>
		public Margin SmallFormFrameRightSizingMargin
		{
			get
			{
				return mSmallFormFrameRightSizingMargin;
			}
		}

		/// <summary>
		/// Count of small form right frame
		/// </summary>
		public int SmallFormFrameRightCount
		{
			get
			{
				return mSmallFormFrameRightCount;
			}
		}

		/// <summary>
		/// Width of small form right frame
		/// </summary>
		public int SmallFormFrameRightWidth
		{
			get
			{
				return mSmallFormFrameRightWidth;
			}
		}

		/// <summary>
		/// Height of small form right frame
		/// </summary>
		public int SmallFormFrameRightHeight
		{
			get
			{
				return mSmallFormFrameRightHeight;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageLT
		{
			get
			{
				return mSmallFormFrameRightImageLT;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageT
		{
			get
			{
				return mSmallFormFrameRightImageT;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageRT
		{
			get
			{
				return mSmallFormFrameRightImageRT;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageLM
		{
			get
			{
				return mSmallFormFrameRightImageLM;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageM
		{
			get
			{
				return mSmallFormFrameRightImageM;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageRM
		{
			get
			{
				return mSmallFormFrameRightImageRM;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageLB
		{
			get
			{
				return mSmallFormFrameRightImageLB;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageB
		{
			get
			{
				return mSmallFormFrameRightImageB;
			}
		}

		/// <summary>
		/// Image of small form right frame
		/// </summary>
		public Image[] SmallFormFrameRightImageRB
		{
			get
			{
				return mSmallFormFrameRightImageRB;
			}
		}

		#endregion

		#region Trackbar

		/// <summary>
		/// Image of trackbar track
		/// </summary>
		public Image TrackbarTrack
		{
			get
			{
				return mTrackbarTrack;
			}
		}

		/// <summary>
		/// Image of trackbar thumb
		/// </summary>
		public Image TrackbarThumb
		{
			get
			{
				return mTrackbarThumb;
			}
		}

		/// <summary>
		/// Image of trackbar thumb both
		/// </summary>
		public Image TrackbarThumbBoth
		{
			get
			{
				return mTrackbarThumbBoth;
			}
		}

		#endregion

		#endregion

		private void InitialiseBaseProperties(Skin skin)
		{
			XmlNode cNode;
			string[] sRGB;

			#region FormBackColor

			cNode = skin.SelectSingleNode("Elements/Form/Color");

			string sBack = cNode.Attributes["BackColor"].Value;
			if (sBack.StartsWith("$"))
				sBack = skin.SelectSingleNode("Colors/" + sBack.Substring(1)).Attributes["Value"].Value;
			sRGB = sBack.Split(',');
			if (sRGB.Length == 3)
				mFormBackColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			else
				mFormBackColor = Color.FromName(sBack);

			#endregion

			#region FormForeColor

			cNode = skin.SelectSingleNode("Elements/Form/Color");

			string sFore = cNode.Attributes["ForeColor"].Value;
			if (sFore.StartsWith("$"))
				sFore = skin.SelectSingleNode("Colors/" + sBack.Substring(1)).Attributes["Value"].Value;
			sRGB = sFore.Split(',');
			if (sRGB.Length == 3)
				mFormForeColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			else
				mFormForeColor = Color.FromName(sFore);

			#endregion

			#region BarColor

			cNode = skin.SelectSingleNode("Elements/Bar/Color");

			sFore = cNode.Attributes["ForeColor"].Value;
			if (sFore.StartsWith("$"))
			{
				sFore = skin.SelectSingleNode("Colors/" + sBack.Substring(1)).Attributes["Value"].Value;
			}
			sRGB = sFore.Split(',');
			if (sRGB.Length == 3)
			{
				mBarForeColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				mBarForeColor = Color.FromName(sFore);
			}

			#endregion

			#region Label
			//cNode = skin.SelectSingleNode("Elements/Label/Color");

			//sFore = cNode.Attributes["ForeColor"].Value;
			//if (sFore.StartsWith("$"))
			//{
			//    sFore = skin.SelectSingleNode("Colors/" + sBack.Substring(1)).Attributes["Value"].Value;
			//}
			//sRGB = sFore.Split(',');
			//if (sRGB.Length == 3)
			//{
			//    mBarForeColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			//}
			//else
			//{
			//    mBarForeColor = Color.FromName(sFore);
			//}
			#endregion

			#region ComboBox
			mComboButtonImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "editors.combobutton.png");
			mComboButtonGlyphImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "editors.combobutton_glyph.png");
			mComboBorderThin = new Margin(skin.SelectSingleNode("Elements/PopupFormBorder/Border/BorderThin"));
			mComboPopupFormBorder = new Border(skin.SelectSingleNode("Elements/PopupFormBorder/Border"));
			mComboSizingMargin = new Margin(skin.SelectSingleNode("Elements/ComboButton/Image/SizingMargins"));
			mComboContentMargin = new Margin(skin.SelectSingleNode("Elements/PopupFormBorder/ContentMargins"));
			mComboMinSize = new Size(skin.SelectSingleNode("Elements/PopupFormBorder/Size"));

			sRGB = skin.SelectSingleNode("Elements/PopupFormBorder/Color").Attributes["BackColor"].Value.Split(',');
			if (sRGB.Length == 3)
			{ 
				mComboBackColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				if (sRGB[0].ToString().StartsWith("$"))
				{
					mComboBackColor = Color.White;
				}
				else
				{
					mComboBackColor = Color.FromName(sRGB[0]);
				}
			}
			#endregion


			#region ComboButton Layout
			mComboButtonLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/ComboButton/Glyph").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/ComboButton/Glyph").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mComboButtonLayout = LayoutDirection.Vertical;
				}
			}
			#endregion

			#region ComboButton Glyph Layout
			mComboGlyphLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/ComboButton/Glyph").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/ComboButton/Glyph").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mComboGlyphLayout = LayoutDirection.Vertical;
				}
			}
			#endregion

			#region ControlColor

			sRGB = skin.SelectSingleNode("Colors/Control").Attributes["Value"].Value.Split(',');
			if (sRGB.Length == 3)
			{
				mControlColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				mControlColor = Color.FromName(sRGB[0]);
			}

			#endregion

			#region ControlDisabledColor

			sRGB = skin.SelectSingleNode("Colors/DisabledControl").Attributes["Value"].Value.Split(',');
			if (sRGB.Length == 3)
			{
				mControlDisabledColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				mControlDisabledColor = Color.FromName(sRGB[0]);
			}

			#endregion

			#region ControlTextColor

			sRGB = skin.SelectSingleNode("Colors/ControlText").Attributes["Value"].Value.Split(',');
			if (sRGB.Length == 3)
			{
				mControlTextColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				mControlTextColor = Color.FromName(sRGB[0]);
			}

			#endregion

			#region ControlDisabledTextColor

			sRGB = skin.SelectSingleNode("Colors/DisabledText").Attributes["Value"].Value.Split(',');
			if (sRGB.Length == 3)
			{
				mControlDisabledTextColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				mControlDisabledTextColor = Color.FromName(sRGB[0]);
			}

			#endregion

			#region PopupMenuBackColor

			cNode = skin.SelectSingleNode("Elements/PopupMenu/Color");

			sBack = cNode.Attributes["BackColor"].Value;
			if (sBack.StartsWith("$"))
			{
				sBack = skin.SelectSingleNode("Colors/" + sBack.Substring(1)).Attributes["Value"].Value;
			}
			sRGB = sBack.Split(',');
			if (sRGB.Length == 3)
			{
				mPopupMenuBackColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				mPopupMenuBackColor = Color.FromName(sBack);
			}

			#endregion

			#region PopupMenuForeColor

			cNode = skin.SelectSingleNode("Elements/PopupMenu/Color");

			sFore = cNode.Attributes["ForeColor"].Value;
			if (sFore.StartsWith("$"))
			{
				sFore = skin.SelectSingleNode("Colors/" + sBack.Substring(1)).Attributes["Value"].Value;
			}
			sRGB = sFore.Split(',');
			if (sRGB.Length == 3)
			{
				mPopupMenuForeColor = Color.FromArgb(int.Parse(sRGB[0]), int.Parse(sRGB[1]), int.Parse(sRGB[2]));
			}
			else
			{
				mPopupMenuForeColor = Color.FromName(sFore);
			}

			#endregion

			#region ToolStripLinkSelectedMargin

			mToolStripLinkSelectedMargin = new Margin(skin.SelectSingleNode("Elements/LinkSelected/Image/SizingMargins"));
			
			#endregion

			#region ToolStripPopupMenuCheckMargin

			mToolStripPopupMenuCheckMargin = new Margin(skin.SelectSingleNode("Elements/PopupMenuCheck/Image/SizingMargins"));

			#endregion

			#region ToolStripPopupMenuLinkSelectedMargin

			mToolStripPopupMenuLinkSelectedMargin = new Margin(skin.SelectSingleNode("Elements/PopupMenuLinkSelected/Image/SizingMargins")); ;

			#endregion

			#region ToolStripPopupMenuSideStripMargin

			mToolStripPopupMenuSideStripMargin = new Margin(skin.SelectSingleNode("Elements/PopupMenuSideStrip/Image/SizingMargins"));

			#endregion

			#region MainMenuMargin

			mMainMenuMargin = new Margin(skin.SelectSingleNode("Elements/MainMenu/Image/SizingMargins"));

			#endregion

			#region BarHorizontalMargin

			mBarHorizontalMargin = new Margin(skin.SelectSingleNode("Elements/Bar/Image/SizingMargins"));

			#endregion

			#region BarVerticalMargin

			mBarVerticalMargin = new Margin(skin.SelectSingleNode("Elements/BarVertical/Image/SizingMargins"));

			#endregion

			#region ButtonImage

			mButtonImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "common.button.png");

			#endregion

			#region ButtonLayout

			mButtonLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/Button/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/Button/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mButtonLayout = LayoutDirection.Vertical;
				}
			}
			
			#endregion

			#region ButtonSizingMargin

			mButtonSizingMargin = new Margin(skin.SelectSingleNode("Elements/Button/Image/SizingMargins"));

			#endregion

			#region ButtonContentMargin

			mButtonContentMargin = new Margin(skin.SelectSingleNode("Elements/Button/ContentMargins"));

			#endregion

			#region MainMenuImage

			mMainMenuImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "bars.mainmenu.png");

			#endregion

			#region BarHorizontalImage

			mBarHorizontalImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "bars.bar.png");

			#endregion

			#region BarVerticalImage

			mBarVerticalImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "bars.barvertical.png");

			#endregion

			#region BarSeparatorImage

			mBarSeparatorImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "bars.barseparator.png");

			#endregion

			#region BarVerticalSeparatorImage

			mBarVerticalSeparatorImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "bars.barverticalseparator.png");

			#endregion

			#region ScrollButtonSizingMargin
			mScrollButtonSizingMargin = new Margin(skin.SelectSingleNode("Elements/ScrollButton/Image/SizingMargins"));
			#endregion

			#region ScrollShaftHorizontalSizingMargin
			mScrollShaftHorizSizingMargin = new Margin(skin.SelectSingleNode("Elements/ScrollShaft/Image/SizingMargins"));
			#endregion

			#region ScrollShaftVerticalSizingmargin
			mScrollShaftVertSizingMargin = new Margin(skin.SelectSingleNode("Elements/ScrollShaftVert/Image/SizingMargins"));
			#endregion

			#region ScrollThumbHorizontalSizingMargin
			mScrollThumbHorizSizingMargin = new Margin(skin.SelectSingleNode("Elements/ScrollThumbButton/Image/SizingMargins"));
			#endregion

			#region ScrollThumbVerticalSizingMargin
			mScrollThumbVertSizingMargin = new Margin(skin.SelectSingleNode("Elements/ScrollThumbButtonVert/Image/SizingMargins"));
			#endregion



			#region TabHeaderImage

			mTabHeaderImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "tab.tabheader.png");
			
			#endregion

			#region TabPaneImage

			mTabPaneImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "tab.tabpane.png");

			#endregion

			#region TabHeaderSizingMargin

			mTabHeaderSizingMargin = new Margin(skin.SelectSingleNode("Elements/TabHeader/Image/SizingMargins"));

			#endregion

			#region TabHeaderContentMargin

			mTabHeaderContentMargin = new Margin(skin.SelectSingleNode("Elements/TabHeader/ContentMargins"));

			#endregion

			#region TabPaneSizingMargin

			mTabPaneSizingMargin = new Margin(skin.SelectSingleNode("Elements/TabPane/Image/SizingMargins"));

			#endregion

			#region TabPaneContentMargin

			mTabPaneContentMargin = new Margin(skin.SelectSingleNode("Elements/TabPane/ContentMargins"));

			#endregion

			#region TabHeaderLayout

			mTabHeaderLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/TabHeader/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/TabHeader/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mTabHeaderLayout = LayoutDirection.Vertical;
				}
			}

			#endregion

			#region TabPaneLayout

			mTabPaneLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/TabPane/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/TabPane/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mTabPaneLayout = LayoutDirection.Vertical;
				}
			}

			#endregion

			#region MainMenuImage Rectangles

			mMainMenuImageLeftTop = new Rectangle(0, 0, mMainMenuMargin.Left, mMainMenuMargin.Top);
			mMainMenuImageMiddleTop = new Rectangle(mMainMenuMargin.Left, 0, mMainMenuImage.Width - mMainMenuMargin.Horizontal, mMainMenuMargin.Top);
			mMainMenuImageRightTop = new Rectangle(mMainMenuImage.Width - mMainMenuMargin.Right, 0, mMainMenuMargin.Right, mMainMenuMargin.Top);
			mMainMenuImageLeftMiddle = new Rectangle(0, mMainMenuMargin.Top, mMainMenuMargin.Left, (mMainMenuImage.Height - 1) - mMainMenuMargin.Vertical);
			mMainMenuImageMiddle = new Rectangle(mMainMenuMargin.Left, 0 + mMainMenuMargin.Top, mMainMenuImage.Width - mMainMenuMargin.Horizontal, (mMainMenuImage.Height - 1) - mMainMenuMargin.Vertical);
			mMainMenuImageRightMiddle = new Rectangle(mMainMenuImage.Width - mMainMenuMargin.Right, mMainMenuMargin.Top, mMainMenuMargin.Right, (mMainMenuImage.Height - 1) - mMainMenuMargin.Vertical);
			mMainMenuImageLeftBottom = new Rectangle(0, mMainMenuImage.Height - mMainMenuMargin.Bottom, mMainMenuMargin.Left, mMainMenuMargin.Bottom);
			mMainMenuImageMiddleBottom = new Rectangle(mMainMenuMargin.Left, mMainMenuImage.Height - mMainMenuMargin.Bottom, mMainMenuImage.Width - mMainMenuMargin.Horizontal, mMainMenuMargin.Bottom);
			mMainMenuImageRightBottom = new Rectangle(mMainMenuImage.Width - mMainMenuMargin.Right, mMainMenuImage.Height - mMainMenuMargin.Bottom, mMainMenuMargin.Right, mMainMenuMargin.Bottom);

			#endregion

			#region BarHorizontalImage Rectangles

			mBarHorizontalImageLeftTop = new Rectangle(0, 0, mBarHorizontalMargin.Left, mBarHorizontalMargin.Top);
			mBarHorizontalImageMiddleTop = new Rectangle(mBarHorizontalMargin.Left, 0, mBarHorizontalImage.Width - mBarHorizontalMargin.Horizontal, mBarHorizontalMargin.Top);
			mBarHorizontalImageRightTop = new Rectangle(mBarHorizontalImage.Width - mBarHorizontalMargin.Right, 0, mBarHorizontalMargin.Right, mBarHorizontalMargin.Top);
			mBarHorizontalImageLeftMiddle = new Rectangle(0, mBarHorizontalMargin.Top, mBarHorizontalMargin.Left, (mBarHorizontalImage.Height - 1) - mBarHorizontalMargin.Vertical);
			mBarHorizontalImageMiddle = new Rectangle(mBarHorizontalMargin.Left, mBarHorizontalMargin.Top, mBarHorizontalImage.Width - mBarHorizontalMargin.Horizontal, (mBarHorizontalImage.Height - 1) - mBarHorizontalMargin.Vertical);
			mBarHorizontalImageRightMiddle = new Rectangle(mBarHorizontalImage.Width - mBarHorizontalMargin.Right, mBarHorizontalMargin.Top, mBarHorizontalMargin.Right, (mBarHorizontalImage.Height - 1) - mBarHorizontalMargin.Vertical);
			mBarHorizontalImageLeftBottom = new Rectangle(0, mBarHorizontalImage.Height - mBarHorizontalMargin.Bottom, mBarHorizontalMargin.Left, mBarHorizontalMargin.Bottom);
			mBarHorizontalImageMiddleBottom = new Rectangle(mBarHorizontalMargin.Left, mBarHorizontalImage.Height - mBarHorizontalMargin.Bottom, mBarHorizontalImage.Width - mBarHorizontalMargin.Horizontal, mBarHorizontalMargin.Bottom);
			mBarHorizontalImageRightBottom = new Rectangle(mBarHorizontalImage.Width - mBarHorizontalMargin.Right, mBarHorizontalImage.Height - mBarHorizontalMargin.Bottom, mBarHorizontalMargin.Right, mBarHorizontalMargin.Bottom);

			#endregion

			#region BarVerticalImage Rectangles

			mBarVerticalImageLeftTop = new Rectangle(0, 0, mBarVerticalMargin.Left, mBarVerticalMargin.Top);
			mBarVerticalImageMiddleTop = new Rectangle(mBarVerticalMargin.Left, 0, mBarVerticalImage.Width - mBarVerticalMargin.Vertical, mBarVerticalMargin.Top);
			mBarVerticalImageRightTop = new Rectangle(mBarVerticalImage.Width - mBarVerticalMargin.Right, 0, mBarVerticalMargin.Right, mBarVerticalMargin.Top);
			mBarVerticalImageLeftMiddle = new Rectangle(0, mBarVerticalMargin.Top, mBarVerticalMargin.Left, (mBarVerticalImage.Height - 1) - mBarVerticalMargin.Vertical);
			mBarVerticalImageMiddle = new Rectangle(mBarVerticalMargin.Left, mBarVerticalMargin.Top, mBarVerticalImage.Width - mBarVerticalMargin.Vertical, (mBarVerticalImage.Height - 1) - mBarVerticalMargin.Vertical);
			mBarVerticalImageRightMiddle = new Rectangle(mBarVerticalImage.Width - mBarVerticalMargin.Right, mBarVerticalMargin.Top, mBarVerticalMargin.Right, (mBarVerticalImage.Height - 1) - mBarVerticalMargin.Vertical);
			mBarVerticalImageLeftBottom = new Rectangle(0, mBarVerticalImage.Height - mBarVerticalMargin.Bottom, mBarVerticalMargin.Left, mBarVerticalMargin.Bottom);
			mBarVerticalImageMiddleBottom = new Rectangle(mBarVerticalMargin.Left, mBarVerticalImage.Height - mBarVerticalMargin.Bottom, mBarVerticalImage.Width - mBarVerticalMargin.Vertical, mBarVerticalMargin.Bottom);
			mBarVerticalImageRightBottom = new Rectangle(mBarVerticalImage.Width - mBarVerticalMargin.Right, mBarVerticalImage.Height - mBarVerticalMargin.Bottom, mBarVerticalMargin.Right, mBarVerticalMargin.Bottom);

			#endregion

			#region GroupPanel

			mGroupPanelImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "common.grouppanel.png");

			#endregion

			#region Form's parts

			#region FormButtonClose

			mFormButtonCloseSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormButtonClose/Image/SizingMargins"));

			mFormButtonCloseImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonclose.png");
			mFormButtonCloseVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonClose/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonClose/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonCloseVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonCloseCount = 5;
			mFormButtonCloseImageLT = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageT = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageRT = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageLM = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageM = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageRM = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageLB = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageB = new Image[mFormButtonCloseCount];
			mFormButtonCloseImageRB = new Image[mFormButtonCloseCount];

			mFormButtonCloseWidth = mFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? mFormButtonCloseImage.Width : (Int32)(mFormButtonCloseImage.Width / mFormButtonCloseCount);
			mFormButtonCloseHeight = mFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonCloseImage.Height / mFormButtonCloseCount) : mFormButtonCloseImage.Height;

			for (int i = 0; i < mFormButtonCloseCount; i++)
			{
				int imgTop = mFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonCloseHeight : 0;
				int imgLeft = mFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonCloseWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormButtonCloseSizingMargin.Left, mFormButtonCloseSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormButtonCloseSizingMargin.Left, imgTop, mFormButtonCloseWidth - mFormButtonCloseSizingMargin.Horizontal, mFormButtonCloseSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormButtonCloseWidth - mFormButtonCloseSizingMargin.Right, imgTop, mFormButtonCloseSizingMargin.Right, mFormButtonCloseSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormButtonCloseSizingMargin.Top, mFormButtonCloseSizingMargin.Left, mFormButtonCloseHeight - mFormButtonCloseSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormButtonCloseSizingMargin.Left, imgTop + mFormButtonCloseSizingMargin.Top, mFormButtonCloseWidth - mFormButtonCloseSizingMargin.Horizontal, mFormButtonCloseHeight - mFormButtonCloseSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormButtonCloseWidth - mFormButtonCloseSizingMargin.Right, imgTop + mFormButtonCloseSizingMargin.Top, mFormButtonCloseSizingMargin.Right, mFormButtonCloseHeight - mFormButtonCloseSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormButtonCloseHeight - mFormButtonCloseSizingMargin.Bottom, mFormButtonCloseSizingMargin.Left, mFormButtonCloseSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mFormButtonCloseSizingMargin.Left, imgTop + mFormButtonCloseHeight - mFormButtonCloseSizingMargin.Bottom, mFormButtonCloseWidth - mFormButtonCloseSizingMargin.Horizontal, mFormButtonCloseSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mFormButtonCloseWidth - mFormButtonCloseSizingMargin.Right, imgTop + mFormButtonCloseHeight - mFormButtonCloseSizingMargin.Bottom, mFormButtonCloseSizingMargin.Right, mFormButtonCloseSizingMargin.Bottom);

				mFormButtonCloseImageLT[i] = GetImagePart(mFormButtonCloseImage, iLT);
				mFormButtonCloseImageT[i] = GetImagePart(mFormButtonCloseImage, iT);
				mFormButtonCloseImageRT[i] = GetImagePart(mFormButtonCloseImage, iRT);
				mFormButtonCloseImageLM[i] = GetImagePart(mFormButtonCloseImage, iLM);
				mFormButtonCloseImageM[i] = GetImagePart(mFormButtonCloseImage, iM);
				mFormButtonCloseImageRM[i] = GetImagePart(mFormButtonCloseImage, iRM);
				mFormButtonCloseImageLB[i] = GetImagePart(mFormButtonCloseImage, iLB);
				mFormButtonCloseImageB[i] = GetImagePart(mFormButtonCloseImage, iB);
				mFormButtonCloseImageRB[i] = GetImagePart(mFormButtonCloseImage, iRB);
			}

			#endregion

			#region FormButtonCloseGlyph

			mFormButtonCloseGlyphImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonclose_glyph.png");
			mFormButtonCloseGlyphVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonClose/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonClose/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonCloseGlyphVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonCloseGlyphCount = 5;
			mFormButtonCloseGlyphImageM = new Image[mFormButtonCloseGlyphCount];

			mFormButtonCloseGlyphWidth = mFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? mFormButtonCloseGlyphImage.Width : (Int32)(mFormButtonCloseGlyphImage.Width / mFormButtonCloseGlyphCount);
			mFormButtonCloseGlyphHeight = mFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonCloseGlyphImage.Height / mFormButtonCloseGlyphCount) : mFormButtonCloseGlyphImage.Height;

			for (int i = 0; i < mFormButtonCloseGlyphCount; i++)
			{
				int imgTop = mFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonCloseGlyphHeight : 0;
				int imgLeft = mFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonCloseGlyphWidth;

				Rectangle iM = new Rectangle(imgLeft, imgTop, mFormButtonCloseGlyphWidth, mFormButtonCloseGlyphHeight);
				
				mFormButtonCloseGlyphImageM[i] = GetImagePart(mFormButtonCloseGlyphImage, iM);
			}

			#endregion

			#region FormButtonHelp

			mFormButtonHelpSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormButtonHelp/Image/SizingMargins"));

			mFormButtonHelpImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonhelp.png");
			mFormButtonHelpVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonHelp/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonHelp/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonHelpVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonHelpCount = 5;
			mFormButtonHelpImageLT = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageT = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageRT = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageLM = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageM = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageRM = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageLB = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageB = new Image[mFormButtonHelpCount];
			mFormButtonHelpImageRB = new Image[mFormButtonHelpCount];

			mFormButtonHelpWidth = mFormButtonHelpVerticalLayout == LayoutDirection.Vertical ? mFormButtonHelpImage.Width : (Int32)(mFormButtonHelpImage.Width / mFormButtonHelpCount);
			mFormButtonHelpHeight = mFormButtonHelpVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonHelpImage.Height / mFormButtonHelpCount) : mFormButtonHelpImage.Height;

			for (int i = 0; i < mFormButtonHelpCount; i++)
			{
				int imgTop = mFormButtonHelpVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonHelpHeight : 0;
				int imgLeft = mFormButtonHelpVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonHelpWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormButtonHelpSizingMargin.Left, mFormButtonHelpSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormButtonHelpSizingMargin.Left, imgTop, mFormButtonHelpWidth - mFormButtonHelpSizingMargin.Horizontal, mFormButtonHelpSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormButtonHelpWidth - mFormButtonHelpSizingMargin.Right, imgTop, mFormButtonHelpSizingMargin.Right, mFormButtonHelpSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormButtonHelpSizingMargin.Top, mFormButtonHelpSizingMargin.Left, mFormButtonHelpHeight - mFormButtonHelpSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormButtonHelpSizingMargin.Left, imgTop + mFormButtonHelpSizingMargin.Top, mFormButtonHelpWidth - mFormButtonHelpSizingMargin.Horizontal, mFormButtonHelpHeight - mFormButtonHelpSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormButtonHelpWidth - mFormButtonHelpSizingMargin.Right, imgTop + mFormButtonHelpSizingMargin.Top, mFormButtonHelpSizingMargin.Right, mFormButtonHelpHeight - mFormButtonHelpSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormButtonHelpHeight - mFormButtonHelpSizingMargin.Bottom, mFormButtonHelpSizingMargin.Left, mFormButtonHelpSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mFormButtonHelpSizingMargin.Left, imgTop + mFormButtonHelpHeight - mFormButtonHelpSizingMargin.Bottom, mFormButtonHelpWidth - mFormButtonHelpSizingMargin.Horizontal, mFormButtonHelpSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mFormButtonHelpWidth - mFormButtonHelpSizingMargin.Right, imgTop + mFormButtonHelpHeight - mFormButtonHelpSizingMargin.Bottom, mFormButtonHelpSizingMargin.Right, mFormButtonHelpSizingMargin.Bottom);

				mFormButtonHelpImageLT[i] = GetImagePart(mFormButtonHelpImage, iLT);
				mFormButtonHelpImageT[i] = GetImagePart(mFormButtonHelpImage, iT);
				mFormButtonHelpImageRT[i] = GetImagePart(mFormButtonHelpImage, iRT);
				mFormButtonHelpImageLM[i] = GetImagePart(mFormButtonHelpImage, iLM);
				mFormButtonHelpImageM[i] = GetImagePart(mFormButtonHelpImage, iM);
				mFormButtonHelpImageRM[i] = GetImagePart(mFormButtonHelpImage, iRM);
				mFormButtonHelpImageLB[i] = GetImagePart(mFormButtonHelpImage, iLB);
				mFormButtonHelpImageB[i] = GetImagePart(mFormButtonHelpImage, iB);
				mFormButtonHelpImageRB[i] = GetImagePart(mFormButtonHelpImage, iRB);
			}

			#endregion

			#region FormButtonHelpGlyph

			mFormButtonHelpGlyphImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonmaximize_glyph.png");
			mFormButtonHelpGlyphVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonHelp/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonHelp/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonHelpGlyphVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonHelpGlyphCount = 5;
			mFormButtonHelpGlyphImageM = new Image[mFormButtonHelpGlyphCount];

			mFormButtonHelpGlyphWidth = mFormButtonHelpGlyphVerticalLayout == LayoutDirection.Vertical ? mFormButtonHelpGlyphImage.Width : (Int32)(mFormButtonHelpGlyphImage.Width / mFormButtonHelpGlyphCount);
			mFormButtonHelpGlyphHeight = mFormButtonHelpGlyphVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonHelpGlyphImage.Height / mFormButtonHelpGlyphCount) : mFormButtonHelpGlyphImage.Height;

			for (int i = 0; i < mFormButtonHelpGlyphCount; i++)
			{
				int imgTop = mFormButtonHelpGlyphVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonHelpGlyphHeight : 0;
				int imgLeft = mFormButtonHelpGlyphVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonHelpGlyphWidth;

				Rectangle iM = new Rectangle(imgLeft, imgTop, mFormButtonHelpGlyphWidth, mFormButtonHelpGlyphHeight);

				mFormButtonHelpGlyphImageM[i] = GetImagePart(mFormButtonHelpGlyphImage, iM);
			}

			#endregion

			#region FormButtonMaximize

			mFormButtonMaximizeSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormButtonMaximize/Image/SizingMargins"));

			mFormButtonMaximizeImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonmaximize.png");
			mFormButtonMaximizeVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonMaximize/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonMaximize/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonMaximizeVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonMaximizeCount = 5;
			mFormButtonMaximizeImageLT = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageT = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageRT = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageLM = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageM = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageRM = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageLB = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageB = new Image[mFormButtonMaximizeCount];
			mFormButtonMaximizeImageRB = new Image[mFormButtonMaximizeCount];

			mFormButtonMaximizeWidth = mFormButtonMaximizeVerticalLayout == LayoutDirection.Vertical ? mFormButtonMaximizeImage.Width : (Int32)(mFormButtonMaximizeImage.Width / mFormButtonMaximizeCount);
			mFormButtonMaximizeHeight = mFormButtonMaximizeVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonMaximizeImage.Height / mFormButtonMaximizeCount) : mFormButtonMaximizeImage.Height;

			for (int i = 0; i < mFormButtonMaximizeCount; i++)
			{
				int imgTop = mFormButtonMaximizeVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonMaximizeHeight : 0;
				int imgLeft = mFormButtonMaximizeVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonMaximizeWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormButtonMaximizeSizingMargin.Left, mFormButtonMaximizeSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormButtonMaximizeSizingMargin.Left, imgTop, mFormButtonMaximizeWidth - mFormButtonMaximizeSizingMargin.Horizontal, mFormButtonMaximizeSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormButtonMaximizeWidth - mFormButtonMaximizeSizingMargin.Right, imgTop, mFormButtonMaximizeSizingMargin.Right, mFormButtonMaximizeSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormButtonMaximizeSizingMargin.Top, mFormButtonMaximizeSizingMargin.Left, mFormButtonMaximizeHeight - mFormButtonMaximizeSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormButtonMaximizeSizingMargin.Left, imgTop + mFormButtonMaximizeSizingMargin.Top, mFormButtonMaximizeWidth - mFormButtonMaximizeSizingMargin.Horizontal, mFormButtonMaximizeHeight - mFormButtonMaximizeSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormButtonMaximizeWidth - mFormButtonMaximizeSizingMargin.Right, imgTop + mFormButtonMaximizeSizingMargin.Top, mFormButtonMaximizeSizingMargin.Right, mFormButtonMaximizeHeight - mFormButtonMaximizeSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormButtonMaximizeHeight - mFormButtonMaximizeSizingMargin.Bottom, mFormButtonMaximizeSizingMargin.Left, mFormButtonMaximizeSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mFormButtonMaximizeSizingMargin.Left, imgTop + mFormButtonMaximizeHeight - mFormButtonMaximizeSizingMargin.Bottom, mFormButtonMaximizeWidth - mFormButtonMaximizeSizingMargin.Horizontal, mFormButtonMaximizeSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mFormButtonMaximizeWidth - mFormButtonMaximizeSizingMargin.Right, imgTop + mFormButtonMaximizeHeight - mFormButtonMaximizeSizingMargin.Bottom, mFormButtonMaximizeSizingMargin.Right, mFormButtonMaximizeSizingMargin.Bottom);

				mFormButtonMaximizeImageLT[i] = GetImagePart(mFormButtonMaximizeImage, iLT);
				mFormButtonMaximizeImageT[i] = GetImagePart(mFormButtonMaximizeImage, iT);
				mFormButtonMaximizeImageRT[i] = GetImagePart(mFormButtonMaximizeImage, iRT);
				mFormButtonMaximizeImageLM[i] = GetImagePart(mFormButtonMaximizeImage, iLM);
				mFormButtonMaximizeImageM[i] = GetImagePart(mFormButtonMaximizeImage, iM);
				mFormButtonMaximizeImageRM[i] = GetImagePart(mFormButtonMaximizeImage, iRM);
				mFormButtonMaximizeImageLB[i] = GetImagePart(mFormButtonMaximizeImage, iLB);
				mFormButtonMaximizeImageB[i] = GetImagePart(mFormButtonMaximizeImage, iB);
				mFormButtonMaximizeImageRB[i] = GetImagePart(mFormButtonMaximizeImage, iRB);
			}

			#endregion

			#region FormButtonMaximizeGlyph

			mFormButtonMaximizeGlyphImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonmaximize_glyph.png");
			mFormButtonMaximizeGlyphVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonMaximize/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonMaximize/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonMaximizeGlyphVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonMaximizeGlyphCount = 5;
			mFormButtonMaximizeGlyphImageM = new Image[mFormButtonMaximizeGlyphCount];

			mFormButtonMaximizeGlyphWidth = mFormButtonMaximizeGlyphVerticalLayout == LayoutDirection.Vertical ? mFormButtonMaximizeGlyphImage.Width : (Int32)(mFormButtonMaximizeGlyphImage.Width / mFormButtonMaximizeGlyphCount);
			mFormButtonMaximizeGlyphHeight = mFormButtonMaximizeGlyphVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonMaximizeGlyphImage.Height / mFormButtonMaximizeGlyphCount) : mFormButtonMaximizeGlyphImage.Height;

			for (int i = 0; i < mFormButtonMaximizeGlyphCount; i++)
			{
				int imgTop = mFormButtonMaximizeGlyphVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonMaximizeGlyphHeight : 0;
				int imgLeft = mFormButtonMaximizeGlyphVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonMaximizeGlyphWidth;

				Rectangle iM = new Rectangle(imgLeft, imgTop, mFormButtonMaximizeGlyphWidth, mFormButtonMaximizeGlyphHeight);

				mFormButtonMaximizeGlyphImageM[i] = GetImagePart(mFormButtonMaximizeGlyphImage, iM);
			}

			#endregion

			#region FormButtonMinimize

			mFormButtonMinimizeSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormButtonMinimize/Image/SizingMargins"));

			mFormButtonMinimizeImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonminimize.png");
			mFormButtonMinimizeVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonMinimize/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonMinimize/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonMinimizeVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonMinimizeCount = 5;
			mFormButtonMinimizeImageLT = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageT = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageRT = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageLM = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageM = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageRM = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageLB = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageB = new Image[mFormButtonMinimizeCount];
			mFormButtonMinimizeImageRB = new Image[mFormButtonMinimizeCount];

			mFormButtonMinimizeWidth = mFormButtonMinimizeVerticalLayout == LayoutDirection.Vertical ? mFormButtonMinimizeImage.Width : (Int32)(mFormButtonMinimizeImage.Width / mFormButtonMinimizeCount);
			mFormButtonMinimizeHeight = mFormButtonMinimizeVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonMinimizeImage.Height / mFormButtonMinimizeCount) : mFormButtonMinimizeImage.Height;

			for (int i = 0; i < mFormButtonMinimizeCount; i++)
			{
				int imgTop = mFormButtonMinimizeVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonMinimizeHeight : 0;
				int imgLeft = mFormButtonMinimizeVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonMinimizeWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormButtonMinimizeSizingMargin.Left, mFormButtonMinimizeSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormButtonMinimizeSizingMargin.Left, imgTop, mFormButtonMinimizeWidth - mFormButtonMinimizeSizingMargin.Horizontal, mFormButtonMinimizeSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormButtonMinimizeWidth - mFormButtonMinimizeSizingMargin.Right, imgTop, mFormButtonMinimizeSizingMargin.Right, mFormButtonMinimizeSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormButtonMinimizeSizingMargin.Top, mFormButtonMinimizeSizingMargin.Left, mFormButtonMinimizeHeight - mFormButtonMinimizeSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormButtonMinimizeSizingMargin.Left, imgTop + mFormButtonMinimizeSizingMargin.Top, mFormButtonMinimizeWidth - mFormButtonMinimizeSizingMargin.Horizontal, mFormButtonMinimizeHeight - mFormButtonMinimizeSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormButtonMinimizeWidth - mFormButtonMinimizeSizingMargin.Right, imgTop + mFormButtonMinimizeSizingMargin.Top, mFormButtonMinimizeSizingMargin.Right, mFormButtonMinimizeHeight - mFormButtonMinimizeSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormButtonMinimizeHeight - mFormButtonMinimizeSizingMargin.Bottom, mFormButtonMinimizeSizingMargin.Left, mFormButtonMinimizeSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mFormButtonMinimizeSizingMargin.Left, imgTop + mFormButtonMinimizeHeight - mFormButtonMinimizeSizingMargin.Bottom, mFormButtonMinimizeWidth - mFormButtonMinimizeSizingMargin.Horizontal, mFormButtonMinimizeSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mFormButtonMinimizeWidth - mFormButtonMinimizeSizingMargin.Right, imgTop + mFormButtonMinimizeHeight - mFormButtonMinimizeSizingMargin.Bottom, mFormButtonMinimizeSizingMargin.Right, mFormButtonMinimizeSizingMargin.Bottom);

				mFormButtonMinimizeImageLT[i] = GetImagePart(mFormButtonMinimizeImage, iLT);
				mFormButtonMinimizeImageT[i] = GetImagePart(mFormButtonMinimizeImage, iT);
				mFormButtonMinimizeImageRT[i] = GetImagePart(mFormButtonMinimizeImage, iRT);
				mFormButtonMinimizeImageLM[i] = GetImagePart(mFormButtonMinimizeImage, iLM);
				mFormButtonMinimizeImageM[i] = GetImagePart(mFormButtonMinimizeImage, iM);
				mFormButtonMinimizeImageRM[i] = GetImagePart(mFormButtonMinimizeImage, iRM);
				mFormButtonMinimizeImageLB[i] = GetImagePart(mFormButtonMinimizeImage, iLB);
				mFormButtonMinimizeImageB[i] = GetImagePart(mFormButtonMinimizeImage, iB);
				mFormButtonMinimizeImageRB[i] = GetImagePart(mFormButtonMinimizeImage, iRB);
			}

			#endregion

			#region FormButtonMinimizeGlyph

			mFormButtonMinimizeGlyphImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonminimize_glyph.png");
			mFormButtonMinimizeGlyphVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonMinimize/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonMinimize/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonMinimizeGlyphVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonMinimizeGlyphCount = 5;
			mFormButtonMinimizeGlyphImageM = new Image[mFormButtonMinimizeGlyphCount];

			mFormButtonMinimizeGlyphWidth = mFormButtonMinimizeGlyphVerticalLayout == LayoutDirection.Vertical ? mFormButtonMinimizeGlyphImage.Width : (Int32)(mFormButtonMinimizeGlyphImage.Width / mFormButtonMinimizeGlyphCount);
			mFormButtonMinimizeGlyphHeight = mFormButtonMinimizeGlyphVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonMinimizeGlyphImage.Height / mFormButtonMinimizeGlyphCount) : mFormButtonMinimizeGlyphImage.Height;

			for (int i = 0; i < mFormButtonMinimizeGlyphCount; i++)
			{
				int imgTop = mFormButtonMinimizeGlyphVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonMinimizeGlyphHeight : 0;
				int imgLeft = mFormButtonMinimizeGlyphVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonMinimizeGlyphWidth;

				Rectangle iM = new Rectangle(imgLeft, imgTop, mFormButtonMinimizeGlyphWidth, mFormButtonMinimizeGlyphHeight);
				
				mFormButtonMinimizeGlyphImageM[i] = GetImagePart(mFormButtonMinimizeGlyphImage, iM);
			}

			#endregion

			#region FormButtonRestore

			mFormButtonRestoreSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormButtonRestore/Image/SizingMargins"));

			mFormButtonRestoreImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonrestore.png");
			mFormButtonRestoreVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonRestore/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonRestore/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonRestoreVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonRestoreCount = 5;
			mFormButtonRestoreImageLT = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageT = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageRT = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageLM = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageM = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageRM = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageLB = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageB = new Image[mFormButtonRestoreCount];
			mFormButtonRestoreImageRB = new Image[mFormButtonRestoreCount];

			mFormButtonRestoreWidth = mFormButtonRestoreVerticalLayout == LayoutDirection.Vertical ? mFormButtonRestoreImage.Width : (Int32)(mFormButtonRestoreImage.Width / mFormButtonRestoreCount);
			mFormButtonRestoreHeight = mFormButtonRestoreVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonRestoreImage.Height / mFormButtonRestoreCount) : mFormButtonRestoreImage.Height;

			for (int i = 0; i < mFormButtonRestoreCount; i++)
			{
				int imgTop = mFormButtonRestoreVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonRestoreHeight : 0;
				int imgLeft = mFormButtonRestoreVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonRestoreWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormButtonRestoreSizingMargin.Left, mFormButtonRestoreSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormButtonRestoreSizingMargin.Left, imgTop, mFormButtonRestoreWidth - mFormButtonRestoreSizingMargin.Horizontal, mFormButtonRestoreSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormButtonRestoreWidth - mFormButtonRestoreSizingMargin.Right, imgTop, mFormButtonRestoreSizingMargin.Right, mFormButtonRestoreSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormButtonRestoreSizingMargin.Top, mFormButtonRestoreSizingMargin.Left, mFormButtonRestoreHeight - mFormButtonRestoreSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormButtonRestoreSizingMargin.Left, imgTop + mFormButtonRestoreSizingMargin.Top, mFormButtonRestoreWidth - mFormButtonRestoreSizingMargin.Horizontal, mFormButtonRestoreHeight - mFormButtonRestoreSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormButtonRestoreWidth - mFormButtonRestoreSizingMargin.Right, imgTop + mFormButtonRestoreSizingMargin.Top, mFormButtonRestoreSizingMargin.Right, mFormButtonRestoreHeight - mFormButtonRestoreSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormButtonRestoreHeight - mFormButtonRestoreSizingMargin.Bottom, mFormButtonRestoreSizingMargin.Left, mFormButtonRestoreSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mFormButtonRestoreSizingMargin.Left, imgTop + mFormButtonRestoreHeight - mFormButtonRestoreSizingMargin.Bottom, mFormButtonRestoreWidth - mFormButtonRestoreSizingMargin.Horizontal, mFormButtonRestoreSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mFormButtonRestoreWidth - mFormButtonRestoreSizingMargin.Right, imgTop + mFormButtonRestoreHeight - mFormButtonRestoreSizingMargin.Bottom, mFormButtonRestoreSizingMargin.Right, mFormButtonRestoreSizingMargin.Bottom);

				mFormButtonRestoreImageLT[i] = GetImagePart(mFormButtonRestoreImage, iLT);
				mFormButtonRestoreImageT[i] = GetImagePart(mFormButtonRestoreImage, iT);
				mFormButtonRestoreImageRT[i] = GetImagePart(mFormButtonRestoreImage, iRT);
				mFormButtonRestoreImageLM[i] = GetImagePart(mFormButtonRestoreImage, iLM);
				mFormButtonRestoreImageM[i] = GetImagePart(mFormButtonRestoreImage, iM);
				mFormButtonRestoreImageRM[i] = GetImagePart(mFormButtonRestoreImage, iRM);
				mFormButtonRestoreImageLB[i] = GetImagePart(mFormButtonRestoreImage, iLB);
				mFormButtonRestoreImageB[i] = GetImagePart(mFormButtonRestoreImage, iB);
				mFormButtonRestoreImageRB[i] = GetImagePart(mFormButtonRestoreImage, iRB);
			}

			#endregion

			#region FormButtonRestoreGlyph

			mFormButtonRestoreGlyphImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formbuttonrestore_glyph.png");
			mFormButtonRestoreGlyphVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormButtonRestore/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormButtonRestore/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormButtonRestoreGlyphVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormButtonRestoreGlyphCount = 5;
			mFormButtonRestoreGlyphImageM = new Image[mFormButtonRestoreGlyphCount];

			mFormButtonRestoreGlyphWidth = mFormButtonRestoreGlyphVerticalLayout == LayoutDirection.Vertical ? mFormButtonRestoreGlyphImage.Width : (Int32)(mFormButtonRestoreGlyphImage.Width / mFormButtonRestoreGlyphCount);
			mFormButtonRestoreGlyphHeight = mFormButtonRestoreGlyphVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormButtonRestoreGlyphImage.Height / mFormButtonRestoreGlyphCount) : mFormButtonRestoreGlyphImage.Height;

			for (int i = 0; i < mFormButtonRestoreGlyphCount; i++)
			{
				int imgTop = mFormButtonRestoreGlyphVerticalLayout == LayoutDirection.Vertical ? i * mFormButtonRestoreGlyphHeight : 0;
				int imgLeft = mFormButtonRestoreGlyphVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormButtonRestoreGlyphWidth;

				Rectangle iM = new Rectangle(imgLeft, imgTop, mFormButtonRestoreGlyphWidth, mFormButtonRestoreGlyphHeight);
				
				mFormButtonRestoreGlyphImageM[i] = GetImagePart(mFormButtonRestoreGlyphImage, iM);
			}

			#endregion

			#region SmallFormButtonClose

			mSmallFormButtonCloseSizingMargin = new Margin(skin.SelectSingleNode("Elements/SmallFormButtonClose/Image/SizingMargins"));

			mSmallFormButtonCloseImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.smallformbuttonclose.png");
			mSmallFormButtonCloseVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/SmallFormButtonClose/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/SmallFormButtonClose/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mSmallFormButtonCloseVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mSmallFormButtonCloseCount = 5;
			mSmallFormButtonCloseImageLT = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageT = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageRT = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageLM = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageM = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageRM = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageLB = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageB = new Image[mSmallFormButtonCloseCount];
			mSmallFormButtonCloseImageRB = new Image[mSmallFormButtonCloseCount];

			mSmallFormButtonCloseWidth = mSmallFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? mSmallFormButtonCloseImage.Width : (Int32)(mSmallFormButtonCloseImage.Width / mSmallFormButtonCloseCount);
			mSmallFormButtonCloseHeight = mSmallFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? (Int32)(mSmallFormButtonCloseImage.Height / mSmallFormButtonCloseCount) : mSmallFormButtonCloseImage.Height;

			for (int i = 0; i < mSmallFormButtonCloseCount; i++)
			{
				int imgTop = mSmallFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? i * mSmallFormButtonCloseHeight : 0;
				int imgLeft = mSmallFormButtonCloseVerticalLayout == LayoutDirection.Vertical ? 0 : i * mSmallFormButtonCloseWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mSmallFormButtonCloseSizingMargin.Left, mSmallFormButtonCloseSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mSmallFormButtonCloseSizingMargin.Left, imgTop, mSmallFormButtonCloseWidth - mSmallFormButtonCloseSizingMargin.Horizontal, mSmallFormButtonCloseSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mSmallFormButtonCloseWidth - mSmallFormButtonCloseSizingMargin.Right, imgTop, mSmallFormButtonCloseSizingMargin.Right, mSmallFormButtonCloseSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mSmallFormButtonCloseSizingMargin.Top, mSmallFormButtonCloseSizingMargin.Left, mSmallFormButtonCloseHeight - mSmallFormButtonCloseSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mSmallFormButtonCloseSizingMargin.Left, imgTop + mSmallFormButtonCloseSizingMargin.Top, mSmallFormButtonCloseWidth - mSmallFormButtonCloseSizingMargin.Horizontal, mSmallFormButtonCloseHeight - mSmallFormButtonCloseSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mSmallFormButtonCloseWidth - mSmallFormButtonCloseSizingMargin.Right, imgTop + mSmallFormButtonCloseSizingMargin.Top, mSmallFormButtonCloseSizingMargin.Right, mSmallFormButtonCloseHeight - mSmallFormButtonCloseSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mSmallFormButtonCloseHeight - mSmallFormButtonCloseSizingMargin.Bottom, mSmallFormButtonCloseSizingMargin.Left, mSmallFormButtonCloseSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mSmallFormButtonCloseSizingMargin.Left, imgTop + mSmallFormButtonCloseHeight - mSmallFormButtonCloseSizingMargin.Bottom, mSmallFormButtonCloseWidth - mSmallFormButtonCloseSizingMargin.Horizontal, mSmallFormButtonCloseSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mSmallFormButtonCloseWidth - mSmallFormButtonCloseSizingMargin.Right, imgTop + mSmallFormButtonCloseHeight - mSmallFormButtonCloseSizingMargin.Bottom, mSmallFormButtonCloseSizingMargin.Right, mSmallFormButtonCloseSizingMargin.Bottom);

				mSmallFormButtonCloseImageLT[i] = GetImagePart(mSmallFormButtonCloseImage, iLT);
				mSmallFormButtonCloseImageT[i] = GetImagePart(mSmallFormButtonCloseImage, iT);
				mSmallFormButtonCloseImageRT[i] = GetImagePart(mSmallFormButtonCloseImage, iRT);
				mSmallFormButtonCloseImageLM[i] = GetImagePart(mSmallFormButtonCloseImage, iLM);
				mSmallFormButtonCloseImageM[i] = GetImagePart(mSmallFormButtonCloseImage, iM);
				mSmallFormButtonCloseImageRM[i] = GetImagePart(mSmallFormButtonCloseImage, iRM);
				mSmallFormButtonCloseImageLB[i] = GetImagePart(mSmallFormButtonCloseImage, iLB);
				mSmallFormButtonCloseImageB[i] = GetImagePart(mSmallFormButtonCloseImage, iB);
				mSmallFormButtonCloseImageRB[i] = GetImagePart(mSmallFormButtonCloseImage, iRB);
			}

			#endregion

			#region SmallFormButtonCloseGlyph

			mSmallFormButtonCloseGlyphImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.smallformbuttonclose_glyph.png");
			mSmallFormButtonCloseGlyphVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/SmallFormButtonClose/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/SmallFormButtonClose/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mSmallFormButtonCloseGlyphVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mSmallFormButtonCloseGlyphCount = 5;
			mSmallFormButtonCloseGlyphImageM = new Image[mSmallFormButtonCloseGlyphCount];

			mSmallFormButtonCloseGlyphWidth = mSmallFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? mSmallFormButtonCloseGlyphImage.Width : (Int32)(mSmallFormButtonCloseGlyphImage.Width / mSmallFormButtonCloseGlyphCount);
			mSmallFormButtonCloseGlyphHeight = mSmallFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? (Int32)(mSmallFormButtonCloseGlyphImage.Height / mSmallFormButtonCloseGlyphCount) : mSmallFormButtonCloseGlyphImage.Height;

			for (int i = 0; i < mSmallFormButtonCloseGlyphCount; i++)
			{
				int imgTop = mSmallFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? i * mSmallFormButtonCloseGlyphHeight : 0;
				int imgLeft = mSmallFormButtonCloseGlyphVerticalLayout == LayoutDirection.Vertical ? 0 : i * mSmallFormButtonCloseGlyphWidth;

				Rectangle iM = new Rectangle(imgLeft, imgTop, mSmallFormButtonCloseGlyphWidth, mSmallFormButtonCloseGlyphHeight);
				
				mSmallFormButtonCloseGlyphImageM[i] = GetImagePart(mSmallFormButtonCloseGlyphImage, iM);
			}

			#endregion

			#region FormCaption

			mFormCaptionSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormCaption/Image/SizingMargins"));
			mFormCaptionContentMargin = new Margin(skin.SelectSingleNode("Elements/FormCaption/ContentMargins"));

			mFormCaptionImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formcaption.png");

			mFormCaptionVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormCaption/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormCaption/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormCaptionVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormCaptionCount = 2;
			mFormCaptionImageLT = new Image[mFormCaptionCount];
			mFormCaptionImageT = new Image[mFormCaptionCount];
			mFormCaptionImageRT = new Image[mFormCaptionCount];
			mFormCaptionImageLM = new Image[mFormCaptionCount];
			mFormCaptionImageM = new Image[mFormCaptionCount];
			mFormCaptionImageRM = new Image[mFormCaptionCount];
			mFormCaptionImageLB = new Image[mFormCaptionCount];
			mFormCaptionImageB = new Image[mFormCaptionCount];
			mFormCaptionImageRB = new Image[mFormCaptionCount];

			mFormCaptionWidth = mFormCaptionVerticalLayout == LayoutDirection.Vertical ? mFormCaptionImage.Width : (Int32)(mFormCaptionImage.Width / mFormCaptionCount);
			mFormCaptionHeight = mFormCaptionVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormCaptionImage.Height / mFormCaptionCount) : mFormCaptionImage.Height;

			for (int i = 0; i < mFormCaptionCount; i++)
			{
				int imgTop = mFormCaptionVerticalLayout == LayoutDirection.Vertical ? i * mFormCaptionHeight : 0;
				int imgLeft = mFormCaptionVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormCaptionWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormCaptionSizingMargin.Left, mFormCaptionSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormCaptionSizingMargin.Left, imgTop, mFormCaptionWidth - mFormCaptionSizingMargin.Horizontal, mFormCaptionSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormCaptionWidth - mFormCaptionSizingMargin.Right, imgTop, mFormCaptionSizingMargin.Right, mFormCaptionSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormCaptionSizingMargin.Top, mFormCaptionSizingMargin.Left, mFormCaptionHeight - mFormCaptionSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormCaptionSizingMargin.Left, imgTop + mFormCaptionSizingMargin.Top, mFormCaptionWidth - mFormCaptionSizingMargin.Horizontal, mFormCaptionHeight - mFormCaptionSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormCaptionWidth - mFormCaptionSizingMargin.Right, imgTop + mFormCaptionSizingMargin.Top, mFormCaptionSizingMargin.Right, mFormCaptionHeight - mFormCaptionSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormCaptionHeight - mFormCaptionSizingMargin.Bottom, mFormCaptionSizingMargin.Left, mFormCaptionSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mFormCaptionSizingMargin.Left, imgTop + mFormCaptionHeight - mFormCaptionSizingMargin.Bottom, mFormCaptionWidth - mFormCaptionSizingMargin.Horizontal, mFormCaptionSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mFormCaptionWidth - mFormCaptionSizingMargin.Right, imgTop + mFormCaptionHeight - mFormCaptionSizingMargin.Bottom, mFormCaptionSizingMargin.Right, mFormCaptionSizingMargin.Bottom);

				mFormCaptionImageLT[i] = GetImagePart(mFormCaptionImage, iLT);
				mFormCaptionImageT[i] = GetImagePart(mFormCaptionImage, iT);
				mFormCaptionImageRT[i] = GetImagePart(mFormCaptionImage, iRT);
				mFormCaptionImageLM[i] = GetImagePart(mFormCaptionImage, iLM);
				mFormCaptionImageM[i] = GetImagePart(mFormCaptionImage, iM);
				mFormCaptionImageRM[i] = GetImagePart(mFormCaptionImage, iRM);
				mFormCaptionImageLB[i] = GetImagePart(mFormCaptionImage, iLB);
				mFormCaptionImageB[i] = GetImagePart(mFormCaptionImage, iB);
				mFormCaptionImageRB[i] = GetImagePart(mFormCaptionImage, iRB);
			}

			#endregion

			#region FormFrameBottom

			mFormFrameBottomSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormFrameBottom/Image/SizingMargins"));

			mFormFrameBottomImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formframebottom.png");

			mFormFrameBottomVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormFrameBottom/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormFrameBottom/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormFrameBottomVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormFrameBottomCount = 2;
			mFormFrameBottomImageLT = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageT = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageRT = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageLM = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageM = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageRM = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageLB = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageB = new Image[mFormFrameBottomCount];
			mFormFrameBottomImageRB = new Image[mFormFrameBottomCount];

			mFormFrameBottomWidth = mFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? mFormFrameBottomImage.Width : (Int32)(mFormFrameBottomImage.Width / mFormFrameBottomCount);
			mFormFrameBottomHeight = mFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormFrameBottomImage.Height / mFormFrameBottomCount) : mFormFrameBottomImage.Height;

			for (int i = 0; i < mFormFrameBottomCount; i++)
			{
				int imgTop = mFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? i * mFormFrameBottomHeight : 0;
				int imgLeft = mFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormFrameBottomWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormFrameBottomSizingMargin.Left, mFormFrameBottomSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormFrameBottomSizingMargin.Left, imgTop, mFormFrameBottomWidth - mFormFrameBottomSizingMargin.Horizontal , mFormFrameBottomSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormFrameBottomWidth - mFormFrameBottomSizingMargin.Right, imgTop, mFormFrameBottomSizingMargin.Right, mFormFrameBottomSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormFrameBottomSizingMargin.Top, mFormFrameBottomSizingMargin.Left, mFormFrameBottomHeight - mFormFrameBottomSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormFrameBottomSizingMargin.Left, imgTop + mFormFrameBottomSizingMargin.Top, mFormFrameBottomWidth - mFormFrameBottomSizingMargin.Horizontal , mFormFrameBottomHeight - mFormFrameBottomSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormFrameBottomWidth - mFormFrameBottomSizingMargin.Right, imgTop + mFormFrameBottomSizingMargin.Top, mFormFrameBottomSizingMargin.Right, mFormFrameBottomHeight - mFormFrameBottomSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormFrameBottomHeight - mFormFrameBottomSizingMargin.Bottom, mFormFrameBottomSizingMargin.Left, mFormFrameBottomSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mFormFrameBottomSizingMargin.Left, imgTop + mFormFrameBottomHeight - mFormFrameBottomSizingMargin.Bottom, mFormFrameBottomWidth - mFormFrameBottomSizingMargin.Horizontal, mFormFrameBottomSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mFormFrameBottomWidth - mFormFrameBottomSizingMargin.Right, imgTop + mFormFrameBottomHeight - mFormFrameBottomSizingMargin.Bottom, mFormFrameBottomSizingMargin.Right, mFormFrameBottomSizingMargin.Bottom);

				mFormFrameBottomImageLT[i] = GetImagePart(mFormFrameBottomImage, iLT);
				mFormFrameBottomImageT[i] = GetImagePart(mFormFrameBottomImage, iT);
				mFormFrameBottomImageRT[i] = GetImagePart(mFormFrameBottomImage, iRT);
				mFormFrameBottomImageLM[i] = GetImagePart(mFormFrameBottomImage, iLM);
				mFormFrameBottomImageM[i] = GetImagePart(mFormFrameBottomImage, iM);
				mFormFrameBottomImageRM[i] = GetImagePart(mFormFrameBottomImage, iRM);
				mFormFrameBottomImageLB[i] = GetImagePart(mFormFrameBottomImage, iLB);
				mFormFrameBottomImageB[i] = GetImagePart(mFormFrameBottomImage, iB);
				mFormFrameBottomImageRB[i] = GetImagePart(mFormFrameBottomImage, iRB);
			}

			#endregion

			#region FormFrameLeft

			mFormFrameLeftSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormFrameLeft/Image/SizingMargins"));

			mFormFrameLeftImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formframeleft.png");
			mFormFrameLeftVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormFrameLeft/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormFrameLeft/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormFrameLeftVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormFrameLeftCount = 2;
			mFormFrameLeftImageLT = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageT = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageRT = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageLM = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageM = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageRM = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageLB = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageB = new Image[mFormFrameLeftCount];
			mFormFrameLeftImageRB = new Image[mFormFrameLeftCount];

			mFormFrameLeftWidth = mFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? mFormFrameLeftImage.Width : (Int32)(mFormFrameLeftImage.Width / mFormFrameLeftCount);
			mFormFrameLeftHeight = mFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormFrameLeftImage.Height / mFormFrameLeftCount) : mFormFrameLeftImage.Height;

			for (int i = 0; i < mFormFrameLeftCount; i++)
			{
				int imgTop = mFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? i * mFormFrameLeftHeight : 0;
				int imgLeft = mFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormFrameLeftWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormFrameLeftSizingMargin.Left, mFormFrameLeftSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormFrameLeftSizingMargin.Left, imgTop, mFormFrameLeftWidth - mFormFrameLeftSizingMargin.Horizontal, mFormFrameLeftSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormFrameLeftWidth - mFormFrameLeftSizingMargin.Right, imgTop, mFormFrameLeftSizingMargin.Right, mFormFrameLeftSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormFrameLeftSizingMargin.Top, mFormFrameLeftSizingMargin.Left, mFormFrameLeftHeight - mFormFrameLeftSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormFrameLeftSizingMargin.Left, imgTop + mFormFrameLeftSizingMargin.Top, mFormFrameLeftWidth - mFormFrameLeftSizingMargin.Horizontal, mFormFrameLeftHeight - mFormFrameLeftSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormFrameLeftWidth - mFormFrameLeftSizingMargin.Right, imgTop + mFormFrameLeftSizingMargin.Top, mFormFrameLeftSizingMargin.Right, mFormFrameLeftHeight - mFormFrameLeftSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormFrameLeftHeight - mFormFrameLeftSizingMargin.Left, mFormFrameLeftSizingMargin.Left, mFormFrameLeftSizingMargin.Left);
				Rectangle iB = new Rectangle(imgLeft + mFormFrameLeftSizingMargin.Left, imgTop + mFormFrameLeftHeight - mFormFrameLeftSizingMargin.Left, mFormFrameLeftWidth - mFormFrameLeftSizingMargin.Horizontal, mFormFrameLeftSizingMargin.Left);
				Rectangle iRB = new Rectangle(imgLeft + mFormFrameLeftWidth - mFormFrameLeftSizingMargin.Right, imgTop + mFormFrameLeftHeight - mFormFrameLeftSizingMargin.Left, mFormFrameLeftSizingMargin.Right, mFormFrameLeftSizingMargin.Left);

				mFormFrameLeftImageLT[i] = GetImagePart(mFormFrameLeftImage, iLT);
				mFormFrameLeftImageT[i] = GetImagePart(mFormFrameLeftImage, iT);
				mFormFrameLeftImageRT[i] = GetImagePart(mFormFrameLeftImage, iRT);
				mFormFrameLeftImageLM[i] = GetImagePart(mFormFrameLeftImage, iLM);
				mFormFrameLeftImageM[i] = GetImagePart(mFormFrameLeftImage, iM);
				mFormFrameLeftImageRM[i] = GetImagePart(mFormFrameLeftImage, iRM);
				mFormFrameLeftImageLB[i] = GetImagePart(mFormFrameLeftImage, iLB);
				mFormFrameLeftImageB[i] = GetImagePart(mFormFrameLeftImage, iB);
				mFormFrameLeftImageRB[i] = GetImagePart(mFormFrameLeftImage, iRB);
			}

			#endregion

			#region FormFrameRight

			mFormFrameRightSizingMargin = new Margin(skin.SelectSingleNode("Elements/FormFrameRight/Image/SizingMargins"));

			mFormFrameRightImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.formframeright.png");
			mFormFrameRightVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/FormFrameRight/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/FormFrameRight/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mFormFrameRightVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mFormFrameRightCount = 2;
			mFormFrameRightImageLT = new Image[mFormFrameRightCount];
			mFormFrameRightImageT = new Image[mFormFrameRightCount];
			mFormFrameRightImageRT = new Image[mFormFrameRightCount];
			mFormFrameRightImageLM = new Image[mFormFrameRightCount];
			mFormFrameRightImageM = new Image[mFormFrameRightCount];
			mFormFrameRightImageRM = new Image[mFormFrameRightCount];
			mFormFrameRightImageLB = new Image[mFormFrameRightCount];
			mFormFrameRightImageB = new Image[mFormFrameRightCount];
			mFormFrameRightImageRB = new Image[mFormFrameRightCount];

			mFormFrameRightWidth = mFormFrameRightVerticalLayout == LayoutDirection.Vertical ? mFormFrameRightImage.Width : (Int32)(mFormFrameRightImage.Width / mFormFrameRightCount);
			mFormFrameRightHeight = mFormFrameRightVerticalLayout == LayoutDirection.Vertical ? (Int32)(mFormFrameRightImage.Height / mFormFrameRightCount) : mFormFrameRightImage.Height;

			for (int i = 0; i < mFormFrameRightCount; i++)
			{
				int imgTop = mFormFrameRightVerticalLayout == LayoutDirection.Vertical ? i * mFormFrameRightHeight : 0;
				int imgLeft = mFormFrameRightVerticalLayout == LayoutDirection.Vertical ? 0 : i * mFormFrameRightWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mFormFrameRightSizingMargin.Left, mFormFrameRightSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mFormFrameRightSizingMargin.Left, imgTop, mFormFrameRightWidth - mFormFrameRightSizingMargin.Horizontal, mFormFrameRightSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mFormFrameRightWidth - mFormFrameRightSizingMargin.Right, imgTop, mFormFrameRightSizingMargin.Right, mFormFrameRightSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mFormFrameRightSizingMargin.Top, mFormFrameRightSizingMargin.Left, mFormFrameRightHeight - mFormFrameRightSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mFormFrameRightSizingMargin.Left, imgTop + mFormFrameRightSizingMargin.Top, mFormFrameRightWidth - mFormFrameRightSizingMargin.Horizontal, mFormFrameRightHeight - mFormFrameRightSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mFormFrameRightWidth - mFormFrameRightSizingMargin.Right, imgTop + mFormFrameRightSizingMargin.Top, mFormFrameRightSizingMargin.Right, mFormFrameRightHeight - mFormFrameRightSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mFormFrameRightHeight - mFormFrameRightSizingMargin.Right, mFormFrameRightSizingMargin.Left, mFormFrameRightSizingMargin.Right);
				Rectangle iB = new Rectangle(imgLeft + mFormFrameRightSizingMargin.Left, imgTop + mFormFrameRightHeight - mFormFrameRightSizingMargin.Right, mFormFrameRightWidth - mFormFrameRightSizingMargin.Horizontal, mFormFrameRightSizingMargin.Right);
				Rectangle iRB = new Rectangle(imgLeft + mFormFrameRightWidth - mFormFrameRightSizingMargin.Right, imgTop + mFormFrameRightHeight - mFormFrameRightSizingMargin.Right, mFormFrameRightSizingMargin.Right, mFormFrameRightSizingMargin.Right);

				mFormFrameRightImageLT[i] = GetImagePart(mFormFrameRightImage, iLT);
				mFormFrameRightImageT[i] = GetImagePart(mFormFrameRightImage, iT);
				mFormFrameRightImageRT[i] = GetImagePart(mFormFrameRightImage, iRT);
				mFormFrameRightImageLM[i] = GetImagePart(mFormFrameRightImage, iLM);
				mFormFrameRightImageM[i] = GetImagePart(mFormFrameRightImage, iM);
				mFormFrameRightImageRM[i] = GetImagePart(mFormFrameRightImage, iRM);
				mFormFrameRightImageLB[i] = GetImagePart(mFormFrameRightImage, iLB);
				mFormFrameRightImageB[i] = GetImagePart(mFormFrameRightImage, iB);
				mFormFrameRightImageRB[i] = GetImagePart(mFormFrameRightImage, iRB);
			}

			#endregion

			#region SmallFormCaption

			mSmallFormCaptionSizingMargin = new Margin(skin.SelectSingleNode("Elements/SmallFormCaption/Image/SizingMargins"));
			mSmallFormCaptionContentMargin = new Margin(skin.SelectSingleNode("Elements/SmallFormCaption/ContentMargins"));

			mSmallFormCaptionImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.smallformcaption.png");

			mSmallFormCaptionVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/SmallFormCaption/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/SmallFormCaption/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mSmallFormCaptionVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mSmallFormCaptionCount = 2;
			mSmallFormCaptionImageLT = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageT = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageRT = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageLM = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageM = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageRM = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageLB = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageB = new Image[mSmallFormCaptionCount];
			mSmallFormCaptionImageRB = new Image[mSmallFormCaptionCount];

			mSmallFormCaptionWidth = mSmallFormCaptionVerticalLayout == LayoutDirection.Vertical ? mSmallFormCaptionImage.Width : (Int32)(mSmallFormCaptionImage.Width / mSmallFormCaptionCount);
			mSmallFormCaptionHeight = mSmallFormCaptionVerticalLayout == LayoutDirection.Vertical ? (Int32)(mSmallFormCaptionImage.Height / mSmallFormCaptionCount) : mSmallFormCaptionImage.Height;

			for (int i = 0; i < mSmallFormCaptionCount; i++)
			{
				int imgTop = mSmallFormCaptionVerticalLayout == LayoutDirection.Vertical ? i * mSmallFormCaptionHeight : 0;
				int imgLeft = mSmallFormCaptionVerticalLayout == LayoutDirection.Vertical ? 0 : i * mSmallFormCaptionWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mSmallFormCaptionSizingMargin.Left, mSmallFormCaptionSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mSmallFormCaptionSizingMargin.Left, imgTop, mSmallFormCaptionWidth - mSmallFormCaptionSizingMargin.Horizontal, mSmallFormCaptionSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mSmallFormCaptionWidth - mSmallFormCaptionSizingMargin.Right, imgTop, mSmallFormCaptionSizingMargin.Right, mSmallFormCaptionSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mSmallFormCaptionSizingMargin.Top, mSmallFormCaptionSizingMargin.Left, mSmallFormCaptionHeight - mSmallFormCaptionSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mSmallFormCaptionSizingMargin.Left, imgTop + mSmallFormCaptionSizingMargin.Top, mSmallFormCaptionWidth - mSmallFormCaptionSizingMargin.Horizontal, mSmallFormCaptionHeight - mSmallFormCaptionSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mSmallFormCaptionWidth - mSmallFormCaptionSizingMargin.Right, imgTop + mSmallFormCaptionSizingMargin.Top, mSmallFormCaptionSizingMargin.Right, mSmallFormCaptionHeight - mSmallFormCaptionSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mSmallFormCaptionHeight - mSmallFormCaptionSizingMargin.Bottom, mSmallFormCaptionSizingMargin.Left, mSmallFormCaptionSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mSmallFormCaptionSizingMargin.Left, imgTop + mSmallFormCaptionHeight - mSmallFormCaptionSizingMargin.Bottom, mSmallFormCaptionWidth - mSmallFormCaptionSizingMargin.Horizontal, mSmallFormCaptionSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mSmallFormCaptionWidth - mSmallFormCaptionSizingMargin.Right, imgTop + mSmallFormCaptionHeight - mSmallFormCaptionSizingMargin.Bottom, mSmallFormCaptionSizingMargin.Right, mSmallFormCaptionSizingMargin.Bottom);

				mSmallFormCaptionImageLT[i] = GetImagePart(mSmallFormCaptionImage, iLT);
				mSmallFormCaptionImageT[i] = GetImagePart(mSmallFormCaptionImage, iT);
				mSmallFormCaptionImageRT[i] = GetImagePart(mSmallFormCaptionImage, iRT);
				mSmallFormCaptionImageLM[i] = GetImagePart(mSmallFormCaptionImage, iLM);
				mSmallFormCaptionImageM[i] = GetImagePart(mSmallFormCaptionImage, iM);
				mSmallFormCaptionImageRM[i] = GetImagePart(mSmallFormCaptionImage, iRM);
				mSmallFormCaptionImageLB[i] = GetImagePart(mSmallFormCaptionImage, iLB);
				mSmallFormCaptionImageB[i] = GetImagePart(mSmallFormCaptionImage, iB);
				mSmallFormCaptionImageRB[i] = GetImagePart(mSmallFormCaptionImage, iRB);
			}

			#endregion

			#region SmallFormFrameBottom

			mSmallFormFrameBottomSizingMargin = new Margin(skin.SelectSingleNode("Elements/SmallFormFrameBottom/Image/SizingMargins"));

			mSmallFormFrameBottomImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.smallformframebottom.png");
			mSmallFormFrameBottomVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/SmallFormFrameBottom/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/SmallFormFrameBottom/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mSmallFormFrameBottomVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mSmallFormFrameBottomCount = 2;
			mSmallFormFrameBottomImageLT = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageT = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageRT = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageLM = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageM = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageRM = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageLB = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageB = new Image[mSmallFormFrameBottomCount];
			mSmallFormFrameBottomImageRB = new Image[mSmallFormFrameBottomCount];

			mSmallFormFrameBottomWidth = mSmallFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? mSmallFormFrameBottomImage.Width : (Int32)(mSmallFormFrameBottomImage.Width / mSmallFormFrameBottomCount);
			mSmallFormFrameBottomHeight = mSmallFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? (Int32)(mSmallFormFrameBottomImage.Height / mSmallFormFrameBottomCount) : mSmallFormFrameBottomImage.Height;

			for (int i = 0; i < mSmallFormFrameBottomCount; i++)
			{
				int imgTop = mSmallFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? i * mSmallFormFrameBottomHeight : 0;
				int imgLeft = mSmallFormFrameBottomVerticalLayout == LayoutDirection.Vertical ? 0 : i * mSmallFormFrameBottomWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mSmallFormFrameBottomSizingMargin.Left, mSmallFormFrameBottomSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mSmallFormFrameBottomSizingMargin.Left, imgTop, mSmallFormFrameBottomWidth - mSmallFormFrameBottomSizingMargin.Horizontal, mSmallFormFrameBottomSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mSmallFormFrameBottomWidth - mSmallFormFrameBottomSizingMargin.Right, imgTop, mSmallFormFrameBottomSizingMargin.Right, mSmallFormFrameBottomSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mSmallFormFrameBottomSizingMargin.Top, mSmallFormFrameBottomSizingMargin.Left, mSmallFormFrameBottomHeight - mSmallFormFrameBottomSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mSmallFormFrameBottomSizingMargin.Left, imgTop + mSmallFormFrameBottomSizingMargin.Top, mSmallFormFrameBottomWidth - mSmallFormFrameBottomSizingMargin.Horizontal, mSmallFormFrameBottomHeight - mSmallFormFrameBottomSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mSmallFormFrameBottomWidth - mSmallFormFrameBottomSizingMargin.Right, imgTop + mSmallFormFrameBottomSizingMargin.Top, mSmallFormFrameBottomSizingMargin.Right, mSmallFormFrameBottomHeight - mSmallFormFrameBottomSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mSmallFormFrameBottomHeight - mSmallFormFrameBottomSizingMargin.Bottom, mSmallFormFrameBottomSizingMargin.Left, mSmallFormFrameBottomSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mSmallFormFrameBottomSizingMargin.Left, imgTop + mSmallFormFrameBottomHeight - mSmallFormFrameBottomSizingMargin.Bottom, mSmallFormFrameBottomWidth - mSmallFormFrameBottomSizingMargin.Horizontal, mSmallFormFrameBottomSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mSmallFormFrameBottomWidth - mSmallFormFrameBottomSizingMargin.Right, imgTop + mSmallFormFrameBottomHeight - mSmallFormFrameBottomSizingMargin.Bottom, mSmallFormFrameBottomSizingMargin.Right, mSmallFormFrameBottomSizingMargin.Bottom);

				mSmallFormFrameBottomImageLT[i] = GetImagePart(mSmallFormFrameBottomImage, iLT);
				mSmallFormFrameBottomImageT[i] = GetImagePart(mSmallFormFrameBottomImage, iT);
				mSmallFormFrameBottomImageRT[i] = GetImagePart(mSmallFormFrameBottomImage, iRT);
				mSmallFormFrameBottomImageLM[i] = GetImagePart(mSmallFormFrameBottomImage, iLM);
				mSmallFormFrameBottomImageM[i] = GetImagePart(mSmallFormFrameBottomImage, iM);
				mSmallFormFrameBottomImageRM[i] = GetImagePart(mSmallFormFrameBottomImage, iRM);
				mSmallFormFrameBottomImageLB[i] = GetImagePart(mSmallFormFrameBottomImage, iLB);
				mSmallFormFrameBottomImageB[i] = GetImagePart(mSmallFormFrameBottomImage, iB);
				mSmallFormFrameBottomImageRB[i] = GetImagePart(mSmallFormFrameBottomImage, iRB);
			}

			#endregion

			#region SmallFormFrameLeft

			mSmallFormFrameLeftSizingMargin = new Margin(skin.SelectSingleNode("Elements/SmallFormFrameLeft/Image/SizingMargins"));

			mSmallFormFrameLeftImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.smallformframeleft.png");
			mSmallFormFrameLeftVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/SmallFormFrameLeft/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/SmallFormFrameLeft/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mSmallFormFrameLeftVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mSmallFormFrameLeftCount = 2;
			mSmallFormFrameLeftImageLT = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageT = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageRT = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageLM = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageM = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageRM = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageLB = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageB = new Image[mSmallFormFrameLeftCount];
			mSmallFormFrameLeftImageRB = new Image[mSmallFormFrameLeftCount];

			mSmallFormFrameLeftWidth = mSmallFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? mSmallFormFrameLeftImage.Width : (Int32)(mSmallFormFrameLeftImage.Width / mSmallFormFrameLeftCount);
			mSmallFormFrameLeftHeight = mSmallFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? (Int32)(mSmallFormFrameLeftImage.Height / mSmallFormFrameLeftCount) : mSmallFormFrameLeftImage.Height;

			for (int i = 0; i < mSmallFormFrameLeftCount; i++)
			{
				int imgTop = mSmallFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? i * mSmallFormFrameLeftHeight : 0;
				int imgLeft = mSmallFormFrameLeftVerticalLayout == LayoutDirection.Vertical ? 0 : i * mSmallFormFrameLeftWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mSmallFormFrameLeftSizingMargin.Left, mSmallFormFrameLeftSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mSmallFormFrameLeftSizingMargin.Left, imgTop, mSmallFormFrameLeftWidth - mSmallFormFrameLeftSizingMargin.Horizontal, mSmallFormFrameLeftSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mSmallFormFrameLeftWidth - mSmallFormFrameLeftSizingMargin.Right, imgTop, mSmallFormFrameLeftSizingMargin.Right, mSmallFormFrameLeftSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mSmallFormFrameLeftSizingMargin.Top, mSmallFormFrameLeftSizingMargin.Left, mSmallFormFrameLeftHeight - mSmallFormFrameLeftSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mSmallFormFrameLeftSizingMargin.Left, imgTop + mSmallFormFrameLeftSizingMargin.Top, mSmallFormFrameLeftWidth - mSmallFormFrameLeftSizingMargin.Horizontal, mSmallFormFrameLeftHeight - mSmallFormFrameLeftSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mSmallFormFrameLeftWidth - mSmallFormFrameLeftSizingMargin.Right, imgTop + mSmallFormFrameLeftSizingMargin.Top, mSmallFormFrameLeftSizingMargin.Right, mSmallFormFrameLeftHeight - mSmallFormFrameLeftSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mSmallFormFrameLeftHeight - mSmallFormFrameLeftSizingMargin.Bottom, mSmallFormFrameLeftSizingMargin.Left, mSmallFormFrameLeftSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mSmallFormFrameLeftSizingMargin.Left, imgTop + mSmallFormFrameLeftHeight - mSmallFormFrameLeftSizingMargin.Bottom, mSmallFormFrameLeftWidth - mSmallFormFrameLeftSizingMargin.Horizontal, mSmallFormFrameLeftSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mSmallFormFrameLeftWidth - mSmallFormFrameLeftSizingMargin.Right, imgTop + mSmallFormFrameLeftHeight - mSmallFormFrameLeftSizingMargin.Bottom, mSmallFormFrameLeftSizingMargin.Right, mSmallFormFrameLeftSizingMargin.Bottom);

				mSmallFormFrameLeftImageLT[i] = GetImagePart(mSmallFormFrameLeftImage, iLT);
				mSmallFormFrameLeftImageT[i] = GetImagePart(mSmallFormFrameLeftImage, iT);
				mSmallFormFrameLeftImageRT[i] = GetImagePart(mSmallFormFrameLeftImage, iRT);
				mSmallFormFrameLeftImageLM[i] = GetImagePart(mSmallFormFrameLeftImage, iLM);
				mSmallFormFrameLeftImageM[i] = GetImagePart(mSmallFormFrameLeftImage, iM);
				mSmallFormFrameLeftImageRM[i] = GetImagePart(mSmallFormFrameLeftImage, iRM);
				mSmallFormFrameLeftImageLB[i] = GetImagePart(mSmallFormFrameLeftImage, iLB);
				mSmallFormFrameLeftImageB[i] = GetImagePart(mSmallFormFrameLeftImage, iB);
				mSmallFormFrameLeftImageRB[i] = GetImagePart(mSmallFormFrameLeftImage, iRB);
			}

			#endregion

			#region SmallFormFrameRight

			mSmallFormFrameRightSizingMargin = new Margin(skin.SelectSingleNode("Elements/SmallFormFrameRight/Image/SizingMargins"));

			mSmallFormFrameRightImage = skin.GetImageFromBitmapResource(skin.KeyPrefix + "form.smallformframeright.png");
			mSmallFormFrameRightVerticalLayout = LayoutDirection.Horizontal;
			if (skin.SelectSingleNode("Elements/SmallFormFrameRight/Image").Attributes["Layout"] != null)
			{
				if (skin.SelectSingleNode("Elements/SmallFormFrameRight/Image").Attributes["Layout"].Value.ToLower() == "vertical")
				{
					mSmallFormFrameRightVerticalLayout = LayoutDirection.Vertical;
				}
			}

			mSmallFormFrameRightCount = 2;
			mSmallFormFrameRightImageLT = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageT = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageRT = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageLM = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageM = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageRM = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageLB = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageB = new Image[mSmallFormFrameRightCount];
			mSmallFormFrameRightImageRB = new Image[mSmallFormFrameRightCount];

			mSmallFormFrameRightWidth = mSmallFormFrameRightVerticalLayout == LayoutDirection.Vertical ? mSmallFormFrameRightImage.Width : (Int32)(mSmallFormFrameRightImage.Width / mSmallFormFrameRightCount);
			mSmallFormFrameRightHeight = mSmallFormFrameRightVerticalLayout == LayoutDirection.Vertical ? (Int32)(mSmallFormFrameRightImage.Height / mSmallFormFrameRightCount) : mSmallFormFrameRightImage.Height;

			for (int i = 0; i < mSmallFormFrameRightCount; i++)
			{
				int imgTop = mSmallFormFrameRightVerticalLayout == LayoutDirection.Vertical ? i * mSmallFormFrameRightHeight : 0;
				int imgLeft = mSmallFormFrameRightVerticalLayout == LayoutDirection.Vertical ? 0 : i * mSmallFormFrameRightWidth;

				Rectangle iLT = new Rectangle(imgLeft, imgTop, mSmallFormFrameRightSizingMargin.Left, mSmallFormFrameRightSizingMargin.Top);
				Rectangle iT = new Rectangle(imgLeft + mSmallFormFrameRightSizingMargin.Left, imgTop, mSmallFormFrameRightWidth - mSmallFormFrameRightSizingMargin.Horizontal, mSmallFormFrameRightSizingMargin.Top);
				Rectangle iRT = new Rectangle(imgLeft + mSmallFormFrameRightWidth - mSmallFormFrameRightSizingMargin.Right, imgTop, mSmallFormFrameRightSizingMargin.Right, mSmallFormFrameRightSizingMargin.Top);
				Rectangle iLM = new Rectangle(imgLeft, imgTop + mSmallFormFrameRightSizingMargin.Top, mSmallFormFrameRightSizingMargin.Left, mSmallFormFrameRightHeight - mSmallFormFrameRightSizingMargin.Vertical);
				Rectangle iM = new Rectangle(imgLeft + mSmallFormFrameRightSizingMargin.Left, imgTop + mSmallFormFrameRightSizingMargin.Top, mSmallFormFrameRightWidth - mSmallFormFrameRightSizingMargin.Horizontal, mSmallFormFrameRightHeight - mSmallFormFrameRightSizingMargin.Vertical);
				Rectangle iRM = new Rectangle(imgLeft + mSmallFormFrameRightWidth - mSmallFormFrameRightSizingMargin.Right, imgTop + mSmallFormFrameRightSizingMargin.Top, mSmallFormFrameRightSizingMargin.Right, mSmallFormFrameRightHeight - mSmallFormFrameRightSizingMargin.Vertical);
				Rectangle iLB = new Rectangle(imgLeft, imgTop + mSmallFormFrameRightHeight - mSmallFormFrameRightSizingMargin.Bottom, mSmallFormFrameRightSizingMargin.Left, mSmallFormFrameRightSizingMargin.Bottom);
				Rectangle iB = new Rectangle(imgLeft + mSmallFormFrameRightSizingMargin.Left, imgTop + mSmallFormFrameRightHeight - mSmallFormFrameRightSizingMargin.Bottom, mSmallFormFrameRightWidth - mSmallFormFrameRightSizingMargin.Horizontal, mSmallFormFrameRightSizingMargin.Bottom);
				Rectangle iRB = new Rectangle(imgLeft + mSmallFormFrameRightWidth - mSmallFormFrameRightSizingMargin.Right, imgTop + mSmallFormFrameRightHeight - mSmallFormFrameRightSizingMargin.Bottom, mSmallFormFrameRightSizingMargin.Right, mSmallFormFrameRightSizingMargin.Bottom);

				mSmallFormFrameRightImageLT[i] = GetImagePart(mSmallFormFrameRightImage, iLT);
				mSmallFormFrameRightImageT[i] = GetImagePart(mSmallFormFrameRightImage, iT);
				mSmallFormFrameRightImageRT[i] = GetImagePart(mSmallFormFrameRightImage, iRT);
				mSmallFormFrameRightImageLM[i] = GetImagePart(mSmallFormFrameRightImage, iLM);
				mSmallFormFrameRightImageM[i] = GetImagePart(mSmallFormFrameRightImage, iM);
				mSmallFormFrameRightImageRM[i] = GetImagePart(mSmallFormFrameRightImage, iRM);
				mSmallFormFrameRightImageLB[i] = GetImagePart(mSmallFormFrameRightImage, iLB);
				mSmallFormFrameRightImageB[i] = GetImagePart(mSmallFormFrameRightImage, iB);
				mSmallFormFrameRightImageRB[i] = GetImagePart(mSmallFormFrameRightImage, iRB);
			}

			#endregion

			#endregion

			#region Trackbar

			mTrackbarTrack = skin.GetImageFromBitmapResource(skin.KeyPrefix + "editors.trackbartrack.png");
			mTrackbarThumb = skin.GetImageFromBitmapResource(skin.KeyPrefix + "editors.trackbarthumb.png");
			mTrackbarThumbBoth = skin.GetImageFromBitmapResource(skin.KeyPrefix + "editors.trackbarthumbboth.png");

			#endregion

		}

		/// <summary>
		/// Get image part
		/// </summary>
		/// <param name="img">image</param>
		/// <param name="imgRect">wanted part</param>
		/// <returns>cropped image</returns>
		public static Image GetImagePart(Image img, Rectangle imgRect)
		{
			if (imgRect.Width != 0 && imgRect.Height != 0)
			{
				Bitmap image = new Bitmap(imgRect.Width + 2, imgRect.Height + 2);
				Graphics g = Graphics.FromImage(image);

				Rectangle rectD;
				Rectangle rectS;

				// draw original picture
				rectD = new Rectangle(1, 1, imgRect.Width, imgRect.Height);
				rectS = new Rectangle(imgRect.X, imgRect.Y, imgRect.Width, imgRect.Height);
				g.DrawImage(img, rectD, rectS, GraphicsUnit.Pixel);

				// draw borders - because Graphics.DrawImage's borderbug

				// up
				rectD = new Rectangle(1, 0, imgRect.Width, 1);
				rectS = new Rectangle(imgRect.X, imgRect.Y, imgRect.Width, 1);
				g.DrawImage(img, rectD, rectS, GraphicsUnit.Pixel);

				// bottom
				rectD = new Rectangle(1, image.Height - 1, imgRect.Width, 1);
				rectS = new Rectangle(imgRect.X, imgRect.Y + imgRect.Height - 1, imgRect.Width, 1);
				g.DrawImage(img, rectD, rectS, GraphicsUnit.Pixel);

				// right
				rectD = new Rectangle(0, 1, 1, imgRect.Height);
				rectS = new Rectangle(imgRect.X, imgRect.Y, 1, imgRect.Height);
				g.DrawImage(img, rectD, rectS, GraphicsUnit.Pixel);

				// left
				rectD = new Rectangle(image.Width - 1, 1, 1, imgRect.Height);
				rectS = new Rectangle(imgRect.X + imgRect.Width - 1, imgRect.Y, 1, imgRect.Height);
				g.DrawImage(img, rectD, rectS, GraphicsUnit.Pixel);

				// corners
				Bitmap orig = (Bitmap)img;
				image.SetPixel(0, 0, orig.GetPixel(imgRect.X, imgRect.Y));
				image.SetPixel(image.Width - 1, 0, orig.GetPixel(imgRect.Right - 1, imgRect.Y));
				image.SetPixel(0, image.Height - 1, orig.GetPixel(imgRect.X, imgRect.Bottom - 1));
				image.SetPixel(image.Width - 1, image.Height - 1, orig.GetPixel(imgRect.Right - 1, imgRect.Bottom - 1));

				return image;
			}
			else
			{
				return null;
			}
		}
	}
}
